diff options
| author | Darkelarious <darkelarious@333networks.com> | 2017-09-25 22:41:59 +0200 |
|---|---|---|
| committer | Darkelarious <darkelarious@333networks.com> | 2017-09-25 22:41:59 +0200 |
| commit | 18fc4c931e75d8de804c601b46dc8c8b339db3d9 (patch) | |
| tree | 58a78c8c7841f649fa2e98ddd94456a55951dfa7 /data | |
| parent | c06322da38b4cb76b2036af1a5448083adb8ff20 (diff) | |
| download | MasterServer-Perl-18fc4c931e75d8de804c601b46dc8c8b339db3d9.tar.gz MasterServer-Perl-18fc4c931e75d8de804c601b46dc8c8b339db3d9.zip | |
game statistics for all servers, numerous small fixes
Diffstat (limited to 'data')
| -rwxr-xr-x | data/masterserver-config.pl | 196 | ||||
| -rwxr-xr-x | data/sql/tables-Pg.sql | 1 | ||||
| -rwxr-xr-x | data/sql/tables-SQLite.sql | 8 | ||||
| -rwxr-xr-x | data/supportedgames.pl | 16 |
4 files changed, 90 insertions, 131 deletions
diff --git a/data/masterserver-config.pl b/data/masterserver-config.pl index 19d166b..51306a6 100755 --- a/data/masterserver-config.pl +++ b/data/masterserver-config.pl @@ -1,41 +1,45 @@ package MasterServer; - -# -# Last update: 22 Aug 2017 -# - our (%S, $ROOT); -our %S = ( - # preserve root path - root => $ROOT, - ################################################################################ -# Masterserver HOST information # +# Masterserver configuration # +# # +# Review the following settings and edit the values to fit your situation. # # # -# Please fill in your contact details here, for two-way synchronization and # -# for your users to be able to contact you. # +# Please fill in your contact details correctly, as this is shown publicly and # +# on other masterservers. See README for more details. # # # # Values may not contain backslashes and quotes: no \ or \\, nor ' and ", # # unless you know exactly what you're doing! # # # +# Supported Games. # +# The masterserver requires ciphers and gamenames configured in the database # +# to function. # +require "$ROOT/data/supportedgames.pl"; # +# Note that adding a game does not necessarily mean that suddenly the protocol # +# will be supported. The above file only provides the necessary parameters. # +# # +# Last configuration update: 25 Sep 2017 # +# # ################################################################################ - # our public display name (shows in "online masterservers" on 333networks.com) - masterserver_hostname => "master.333networks.com (333networks MasterServer Template)", +our %S = ( + %S, root => $ROOT, + +# Masterserver HOST information +# Please fill in your contact details correctly, as this is shown publicly +# and on other masterservers. + + # masterserver address (optional: nickname or clan) + masterserver_hostname => "master.example.com (My MasterServer Name)", - # contact details (shows in TCP requests directly from master to master) + # contact details masterserver_name => 'Your Name Here', masterserver_contact => 'info@example.com', - masterserver_address => 'master.example.com', -################################################################################ -# Database Login Configuration # -# # -# 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, MySQL (not tested with MySQL) # -# # -################################################################################ + +# Database Login Configuration +# Login credentials for the database that was created manually before. +# Supported types: Postgresql, SQLite # Postgresql dblogin => ['dbi:Pg:dbname=masterserver', 'user', 'password'], @@ -43,23 +47,17 @@ our %S = ( # SQLite #dblogin => ["dbi:SQLite:dbname=$ROOT/data/masterserver.db",'',''], - # MySQL - #dblogin => ["dbi:mysql:database=masterserver;host=localhost;port=3306",'user','password'], - - # backup database dump + # Backup interval # new backup for every period of time? options: daily, weekly, monthly, yearly, none dump_db => "daily", - -################################################################################ -# Logging configuration # -# # -# All messages are printed to the log (and screen) by default. The following # -# settings determine the file location and which messages are suppressed. # -# # -################################################################################ - # log file location (folder name!) - log_dir => "$ROOT/log/", + +# Logging +# All messages are printed to the log (and screen) by default. The following +# settings determine the file location and which messages are suppressed. + + # log file location (folder name) + log_dir => "$ROOT/log/", # new log for every period of time? options: daily, weekly, monthly, yearly, none log_rotate => "weekly", @@ -68,12 +66,10 @@ our %S = ( printlog => 1, # which messages do you NOT want to see in the logs (and screen)? + # show all entries #suppress => "none", - # show only important events - suppress => "debug beacon uplink secure tcp add update delete", - # keywords that can be suppressed (from high to low severity): # fatal fail error stop # refused nodevice timeout @@ -84,33 +80,28 @@ our %S = ( # stat kfnew # info debug -################################################################################ -# Network settings # -# # -# Beacon UDP port (beacons) and Browser TCP port (serverlist) # -# # -################################################################################ - - # port settings - listen_port => 28900, # default 28900 - beacon_port => 27900, # default 27900 - - # Timeout time for connections. Some clients are on slow connections - # or are queued for a relatively long time. Recommended: 5s - timeout_time => 10, + # show only important events + suppress => "debug beacon uplink secure tcp add update delete", + + +# Network settings +# Port settings and timeouts -################################################################################ -# Secure/Validate configuration # -# # -# Which servers have to validate? Which games may be ignored? # -# # -################################################################################ + # TCP/client port, default 28900 + listen_port => 28900, + + # UDP/uplink port, default 27900 + beacon_port => 27900, - # disable checks, all games pass as validated (0=validate only, 1=don't check) - debug_validate => 0, + # Timeout time for connections. Recommended: 5 (seconds) + timeout_time => 5, + - # accept only servers that pass the secure/validate challenge, takes longer - # but prevents malicious servers from sending fake query data +# Secure/Validate configuration +# Which servers have to authenticate? + + # accept only servers that can authenticate. takes longer before adding to the + # database, but prevents malicious servers from sending fake query data require_secure_beacons => 1, # ignore keys from games that use multiple keys or do not support keys at all @@ -119,35 +110,17 @@ our %S = ( # some games do not even support the "secure" and "validate" values. Bypass. secure_unsupported => "tribesv", - -################################################################################ -# Enable settings # -# # -# 0 = disabled # -# # -################################################################################ - # Query UCC-based applets - master_applet_enabled => 1, + +# Synchronization settings +# Send beacons to the following selected masterservers. This joins us in the +# 333networks network and makes two-way synchronization possible for all games +# or only selected games. Requires at least one entry to a live masterserver. # Synchronization with other 333networks-based masterservers sync_enabled => 1, - # Beacon Checker - # getting server status info from \all\ servers. executed every 15 minutes to - # keep information up to date. - # disabling breaks support for certain games [like tribesv]. - beacon_checker_enabled => 1, - -################################################################################ -# Synchronization settings # -# # -# Send beacons to the following selected masterservers. This joins us in the # -# 333networks network and makes two-way synchronization possible for all games # -# or only selected games. Requires at least one entry to a live masterserver. # -################################################################################ - - # default masterservers to uplink to + # default masterservers to uplink to and synchronize with sync_masters => [ { address => "master.333networks.com", port => 28900, beacon => 27900 }, { address => "master.noccer.de", port => 28900, beacon => 27900 }, @@ -161,28 +134,26 @@ our %S = ( # other example: [1 + gamenames] = selected games only #sync_games => [1, "ut unreal deusex"], - -################################################################################ -# Query UCC Applets # -# # -# Request the masterlist for single games from the remote UCC applet or # -# equivalent. # -# # -# Arguments: domain/ip, tcp port, array of gamenames # -################################################################################ + + # getting server status info from all servers. executed every 15 minutes to + # keep information up to date. disabling breaks support for certain games + # like tribesv. + beacon_checker_enabled => 1, + +# Query UCC-based Applets +# Request the masterlist for single games from the remote UCC applet -- one way + master_applet_enabled => 1, + + # default applets to query master_applet => [ {address => "utmaster.epicgames.com", port => 28900, games => [qw|ut unreal|]}, {address => "master.hypercoop.tk", port => 28900, games => [qw|unreal|]}, - {address => "sof1master.megalag.org", port => 28900, games => [qw|sofretail|]}, - {address => "master.deusexnetwork.com", port => 28900, games => [qw|deusex|]}, ], -################################################################################ -# Killing Floor Statistics # -# # -# Read player statistics from the KFstats file in the UT2004 configuration. # -# Applies to 333networks Killing Floor Server only! # -################################################################################ +# Killing Floor Statistics +# 333networks has a UT2004+KillingFloor server for which we maintain statistics. +# not related to the masterserver, but we felt no need to remove it. Set to 0 if +# you do not use it. # Collect kfstats info kfstats_enabled => 0, @@ -190,17 +161,6 @@ our %S = ( # kfstats.ini file location kfstats_file => "/UT2004/System/KFStats.ini", -); #end configuration %S - -################################################################################ -# # -# 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 # -# be supported. It only needs the provided ciphers. # -# # -################################################################################ -require "$ROOT/data/supportedgames.pl"; +); 1; diff --git a/data/sql/tables-Pg.sql b/data/sql/tables-Pg.sql index ab68d61..96f8f91 100755 --- a/data/sql/tables-Pg.sql +++ b/data/sql/tables-Pg.sql @@ -101,4 +101,3 @@ CREATE TABLE kfstats( GamesWon INTEGER NOT NULL DEFAULT 0, GamesLost INTEGER NOT NULL DEFAULT 0 ); - diff --git a/data/sql/tables-SQLite.sql b/data/sql/tables-SQLite.sql index 80df6b4..5608a66 100755 --- a/data/sql/tables-SQLite.sql +++ b/data/sql/tables-SQLite.sql @@ -16,8 +16,8 @@ CREATE TABLE serverlist( hostname TEXT, hostport INTEGER DEFAULT 0, country TEXT, - b333ms BOOLEAN DEFAULT FALSE, - blacklisted BOOLEAN DEFAULT FALSE, + b333ms INTEGER DEFAULT 0, + blacklisted INTEGER DEFAULT 0, added timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP, beacon timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP, updated timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP @@ -43,7 +43,7 @@ CREATE TABLE pending( added timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP ); -CREATE TABLE utserver_info( +CREATE TABLE extended_info( server_id INTEGER PRIMARY KEY AUTOINCREMENT, minnetver TEXT, location TEXT, @@ -72,7 +72,7 @@ CREATE TABLE utserver_info( FOREIGN KEY(server_id) REFERENCES serverlist(id) ); -CREATE TABLE utplayer_info( +CREATE TABLE player_info( server_id INTEGER NOT NULL, player TEXT DEFAULT 'Player', team TEXT, diff --git a/data/supportedgames.pl b/data/supportedgames.pl index 18fe83f..3df5234 100755 --- a/data/supportedgames.pl +++ b/data/supportedgames.pl @@ -1,16 +1,16 @@ -our %S = ( -%S, # do not overwrite other parts of the %S config hash - +our %S = (%S, # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -# last change 24 Oktober 2016 +# last change 25 September 2017 +# Changelog 25 Sep 2017: Minor edit in comments. Supportedgames.pl will be completely +# revised/reduced to only provide support for actually functional +# games/protocols. # # Changelog 24 Okt 2016: Added/updated description for the 333networks synchronization # protocol and uplink setup. Works with MS-Perl 2.1.8 and above. -# # -# Changelog 8 Nov 2015: migrated supportedgames.pl to database; after these are games +# Changelog 8 Nov 2015: migrated supportedgames.pl to database; after these games # are loaded, the variables are cleared # # ChangeLog 5 Oct 2015: moved "enc_chars" to Core::Secure.pm, in preparation to @@ -28,7 +28,7 @@ our %S = ( # opportunists to provide fake data or request the data without authorization. # See option "require_secure_beacons" in the configuration file. # -# For questions contact darkelarious@333networks.com or visit at irc. +# For questions contact info@333networks.com or visit at irc. # irc.synirc.net #333networks # # NOTE: DUPLICATES MAY NOT EXIST. IN CASE OF DUPLICATES, ONE OF THE VALUES @@ -39,7 +39,7 @@ our %S = ( # Usage: # game code => {key => "game key", label => "game name label", port => "default port number"} game => { - "333networks" => {key => "", label => "333networks MasterServer (Synchronization Protocol)"}, + "333networks" => {key => "", label => "333networks Masterserver Synchronization"}, "12ironds" => {key => "", label => "12Iron (DS)"}, "12irondsam" => {key => "", label => "12Iron Automatch (DS)"}, "2kboxingds" => {key => "", label => "2K Boxing (DS)"}, |
