diff options
Diffstat (limited to 'data')
| -rwxr-xr-x | data/database/tables-Pg.sql | 52 | ||||
| -rwxr-xr-x | data/database/tables-SQLite.sql | 46 | ||||
| -rwxr-xr-x | data/database/tables-mysql.sql | 28 | ||||
| -rwxr-xr-x | data/masterserver-config.pl | 51 |
4 files changed, 48 insertions, 129 deletions
diff --git a/data/database/tables-Pg.sql b/data/database/tables-Pg.sql index 0778797..abe5744 100755 --- a/data/database/tables-Pg.sql +++ b/data/database/tables-Pg.sql @@ -14,13 +14,6 @@ CREATE TABLE serverlist( updated timestamptz NOT NULL DEFAULT NOW() ); --- TODO -CREATE TABLE user_stats( - gamename VARCHAR(50) NOT NULL DEFAULT ' ', - requests INTEGER NOT NULL DEFAULT 1, - beacons INTEGER NOT NULL DEFAULT 1 -); - CREATE TABLE pending( id SERIAL UNIQUE NOT NULL PRIMARY KEY, ip inet NOT NULL DEFAULT '0.0.0.0', @@ -31,48 +24,3 @@ CREATE TABLE pending( enctype INTEGER NOT NULL DEFAULT 0, added timestamptz NOT NULL DEFAULT NOW() ); - -CREATE TABLE server_info( - server_id SERIAL REFERENCES serverlist(id), - minnetver INTEGER NOT NULL DEFAULT 400, - gamever INTEGER NOT NULL DEFAULT 400, - location INTEGER NOT NULL DEFAULT 0, - listenserver BOOLEAN NOT NULL DEFAULT TRUE, - hostport INTEGER NOT NULL DEFAULT 7777, - hostname varchar(200) NOT NULL DEFAULT '', - adminname varchar(200) NOT NULL DEFAULT '', - adminemail varchar(300) NOT NULL DEFAULT '', - password BOOLEAN NOT NULL DEFAULT FALSE, - gametype varchar(50) NOT NULL DEFAULT '', - gamestyle varchar(50) NOT NULL DEFAULT 'Normal', - changelevels BOOLEAN NOT NULL DEFAULT FALSE, - maptitle varchar(100) NOT NULL DEFAULT 'Unknown', - mapname varchar(100) NOT NULL DEFAULT '', - numplayers INTEGER NOT NULL DEFAULT 0, - maxplayers INTEGER NOT NULL DEFAULT 0, - minplayers INTEGER NOT NULL DEFAULT 0, - botskill varchar(30) NOT NULL DEFAULT 'Novice', - balanceteams BOOLEAN NOT NULL DEFAULT FALSE, - playersbalanceteams BOOLEAN NOT NULL DEFAULT FALSE, - friendlyfire varchar(10) NOT NULL DEFAULT '0%', - maxteams INTEGER NOT NULL DEFAULT 4, - timelimit INTEGER NOT NULL DEFAULT 0, - goalteamscore INTEGER NOT NULL DEFAULT 0, - fraglimit INTEGER NOT NULL DEFAULT 0, - mutators TEXT NOT NULL DEFAULT 'None' -); - -CREATE TABLE player_info( - server_id SERIAL NOT NULL, - player varchar(40) NOT NULL DEFAULT 'Player', - team INTEGER NOT NULL DEFAULT 255, - frags INTEGER NOT NULL DEFAULT 0, - mesh varchar(100) NOT NULL DEFAULT '', - skin varchar(100) NOT NULL DEFAULT '', - face varchar(100) NOT NULL DEFAULT '', - ping INTEGER NOT NULL DEFAULT 0, - ngsecret varchar(10) NOT NULL DEFAULT 'false', - updated timestamptz NOT NULL DEFAULT NOW() -); - - diff --git a/data/database/tables-SQLite.sql b/data/database/tables-SQLite.sql index 37431bb..cd904ed 100755 --- a/data/database/tables-SQLite.sql +++ b/data/database/tables-SQLite.sql @@ -24,49 +24,3 @@ CREATE TABLE pending( enctype INTEGER NOT NULL DEFAULT 0, added timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP ); - -CREATE TABLE server_info( - server_id INTEGER, - minnetver INTEGER NOT NULL DEFAULT 400, - gamever INTEGER NOT NULL DEFAULT 400, - location INTEGER NOT NULL DEFAULT 0, - listenserver BOOLEAN NOT NULL DEFAULT 1, - hostport INTEGER NOT NULL DEFAULT 7777, - hostname varchar(200) NOT NULL DEFAULT '', - adminname varchar(200) NOT NULL DEFAULT '', - adminemail varchar(300) NOT NULL DEFAULT '', - password BOOLEAN NOT NULL DEFAULT 0, - gametype varchar(50) NOT NULL DEFAULT '', - gamestyle varchar(50) NOT NULL DEFAULT 'Normal', - changelevels BOOLEAN NOT NULL DEFAULT 0, - maptitle varchar(100) NOT NULL DEFAULT 'Unknown', - mapname varchar(100) NOT NULL DEFAULT '', - numplayers INTEGER NOT NULL DEFAULT 0, - maxplayers INTEGER NOT NULL DEFAULT 0, - minplayers INTEGER NOT NULL DEFAULT 0, - botskill varchar(30) NOT NULL DEFAULT 'Novice', - balanceteams BOOLEAN NOT NULL DEFAULT 0, - playersbalanceteams BOOLEAN NOT NULL DEFAULT 0, - friendlyfire varchar(10) NOT NULL DEFAULT '0%', - maxteams INTEGER NOT NULL DEFAULT 4, - timelimit INTEGER NOT NULL DEFAULT 0, - goalteamscore INTEGER NOT NULL DEFAULT 0, - fraglimit INTEGER NOT NULL DEFAULT 0, - mutators TEXT NOT NULL DEFAULT 'None', - FOREIGN KEY(server_id) REFERENCES serverlist(id) -); - -CREATE TABLE player_info( - server_id INTEGER PRIMARY KEY AUTOINCREMENT, - player varchar(40) NOT NULL DEFAULT 'Player', - team INTEGER NOT NULL DEFAULT 255, - frags INTEGER NOT NULL DEFAULT 0, - mesh varchar(100) NOT NULL DEFAULT '', - skin varchar(100) NOT NULL DEFAULT '', - face varchar(100) NOT NULL DEFAULT '', - ping INTEGER NOT NULL DEFAULT 0, - ngsecret varchar(10) NOT NULL DEFAULT 'false', - updated timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP -); - - diff --git a/data/database/tables-mysql.sql b/data/database/tables-mysql.sql new file mode 100755 index 0000000..9c1d2fc --- /dev/null +++ b/data/database/tables-mysql.sql @@ -0,0 +1,28 @@ +CREATE TABLE serverlist( + id INTEGER NOT NULL AUTO_INCREMENT, + ip VARCHAR(15) NOT NULL DEFAULT '0.0.0.0', + port INTEGER NOT NULL DEFAULT 0, + gamename VARCHAR(100) NOT NULL DEFAULT ' ', + gamever VARCHAR(50) NOT NULL DEFAULT ' ', + hostname VARCHAR(100) NOT NULL DEFAULT ' ', + hostport INTEGER NOT NULL DEFAULT 0, + country VARCHAR(5), + b333ms BOOLEAN NOT NULL DEFAULT 0, + blacklisted BOOLEAN NOT NULL DEFAULT 0, + added TIMESTAMP NOT NULL DEFAULT NOW(), + beacon TIMESTAMP NOT NULL DEFAULT NOW(), + updated TIMESTAMP NOT NULL DEFAULT NOW(), + PRIMARY KEY (id) +); + +CREATE TABLE pending( + id INTEGER NOT NULL AUTO_INCREMENT, + ip VARCHAR(15) NOT NULL DEFAULT '0.0.0.0', + beaconport INTEGER NOT NULL DEFAULT 0, + heartbeat INTEGER NOT NULL DEFAULT 0, + gamename VARCHAR(25) NOT NULL DEFAULT ' ', + secure VARCHAR(12) NOT NULL DEFAULT ' ', + enctype INTEGER NOT NULL DEFAULT 0, + added TIMESTAMP NOT NULL DEFAULT NOW(), + PRIMARY KEY (id) +); diff --git a/data/masterserver-config.pl b/data/masterserver-config.pl index e8fe418..d5d6091 100755 --- a/data/masterserver-config.pl +++ b/data/masterserver-config.pl @@ -1,11 +1,10 @@ package MasterServer; our (%S, $ROOT); our %S = ( - ################################################################################ # Masterserver HOST information # # # -# Please fill in your contact details here, for two-way synchronization and # +# Please fill in YOUR contact details here, for two-way synchronization and # # for your users to be able to contact you. # # # # Values may not contain backslashes and quotes: no \ or \\, nor ' and ", # @@ -16,7 +15,7 @@ our %S = ( # example: 333networks -- http://master.333networks.com -- info@333networks.com contact_details => '333networks -- http://master.333networks.com -- info@333networks.com', - # host address + # host address, shows when using sync-options masterserver_address => 'master.333networks.com', ################################################################################ @@ -24,18 +23,18 @@ our %S = ( # # # Login credentials for the database that was created manually before. # # Yes, that means that you need to create the database and tables on your own. # -# Use only one option: Postgresql, SQLite (or future: MySQL) # +# Use only one option: Postgresql, SQLite or MySQL # # # ################################################################################ # Postgresql - dblogin => ['dbi:Pg:dbname=database_name', 'username', 'password'], + #dblogin => ['dbi:Pg:dbname=databasename', 'user', 'password'], # SQLite - #dblogin => ["dbi:SQLite:dbname=$ROOT/data/database_name.db",'',''], + #dblogin => ["dbi:SQLite:dbname=$ROOT/data/databasename.db",'',''], # MySQL - #dblogin => ["dbi:mysql:database=database_name;host=localhost;port=3306",'user','password'], + dblogin => ["dbi:mysql:database=databasename;host=localhost;port=3306",'user','password'], ################################################################################ # Logging configuration # @@ -58,7 +57,7 @@ our %S = ( suppress => "none", # show all entries # suppress the most annoying messages - #suppress => "add update delete read tcp udp query secure hostname", + # suppress => "add update delete read tcp udp secure query beacon hostname", # print database errors db_print => 0, @@ -103,30 +102,20 @@ our %S = ( # Wait 60+ seconds before starting timers for incoming beacons # # # ################################################################################ - - # Query UCC-based applets - master_applet_enabled => 1, - master_applet_time => [90, 1200], # Synchronization with other 333networks-based masterservers sync_enabled => 1, # 0 = disabled - sync_time => [180, 1200], + sync_time => [60, 900], + + # Query UCC-based applets + master_applet_enabled => 1, # 0 = disabled + master_applet_time => [90, 900], # Beacon Checker query all addresses in the database, requesting "basic" and # "info". Execute at least twice per hour, to avoid time-outs in own data. # disabling breaks support for certain games [citation needed]. beacon_checker_enabled => 1, - beacon_checker_time => [60, 0.5, 1800], - - # Collect server information for the 333networks main site. Identical - # mechanism as the Beacon Checker. Disable when not interested in UT info - # for your website. - # NB: with some work it can be adapted to work with any other game. Own risk. - utserver_query_enabled => 1, - utserver_query_time => [75, 0.15, 240], - - # Maintenance duties like cleaning out old servers/players - maintenance_time => [3600, 300], + beacon_checker_time => [120, 0.5, 1800], ################################################################################ # Synchronization settings # @@ -136,7 +125,7 @@ our %S = ( # # ################################################################################ - # additional masters to sync with (in addition to db-entries) + # masters to sync with sync_masters => [ { address => "master.333networks.com", port => 28900 }, # default { address => "master.noccer.de", port => 28900 }, @@ -144,10 +133,10 @@ our %S = ( { address => "master.errorist.tk", port => 28900 }, ], - # sync all or selected games? + # sync all or only selected games? # 0 = all, 1 + gamenames = selected + #sync_games => [1, "ut unreal"], # example with only UT/Unreal syncing sync_games => [0], - #sync_games => [1, "ut unreal"], ################################################################################ # Query UCC Applets # @@ -160,19 +149,19 @@ our %S = ( # remote applets to be queried master_applet => [ {ip => "utmaster.epicgames.com", port => 28900, game => "ut"}, - {ip => "master.hypercoop.tk", port => 28900, game => "unreal"}, {ip => "master.newbiesplayground.net", port => 28900, game => "unreal"}, {ip => "master.hlkclan.net", port => 28900, game => "unreal"}, ], -); #end %S +); #end %S config + ################################################################################ # # # Supported Games. # # # -# List of games that are supported by the 333networks masterserver. Note that # -# adding a game does not necessarily mean that suddenly the protocol will # +# List of games of which 333networks has the authentication ciphers. Note that # +# adding a game here does not necessarily mean that suddenly the protocol will # # be supported. # # # ################################################################################ |
