diff options
Diffstat (limited to 'lib/MasterServer/Core')
| -rwxr-xr-x | lib/MasterServer/Core/Logging.pm | 10 | ||||
| -rwxr-xr-x | lib/MasterServer/Core/Schedulers.pm | 7 | ||||
| -rwxr-xr-x | lib/MasterServer/Core/Util.pm | 4 | ||||
| -rwxr-xr-x | lib/MasterServer/Core/Version.pm | 4 |
4 files changed, 13 insertions, 12 deletions
diff --git a/lib/MasterServer/Core/Logging.pm b/lib/MasterServer/Core/Logging.pm index d2094ed..260b379 100755 --- a/lib/MasterServer/Core/Logging.pm +++ b/lib/MasterServer/Core/Logging.pm @@ -18,15 +18,15 @@ sub error { # which one? switch ($error) { # connection timed out - case m/Connection timed out/i {$self->log("timeout", "on $instigator.");} + case m/Connection timed out/i {$self->log("timeout", "on $instigator");} # connection reset by peer - case m/Connection reset by peer/i {$self->log("reset", "on $instigator.");} + case m/Connection reset by peer/i {$self->log("reset", "on $instigator");} # connection refused - case m/Connection refused/i {$self->log("refused", "on $instigator.");} + case m/Connection refused/i {$self->log("refused", "on $instigator");} # no such device or address - case m/No such device or address/i {$self->log("nodevice", "on $instigator.");} + case m/No such device or address/i {$self->log("nodevice", "on $instigator");} # if all else fails - else {$self->log("error", "$error on $instigator.");} + else {$self->log("error", "$error on $instigator");} } } diff --git a/lib/MasterServer/Core/Schedulers.pm b/lib/MasterServer/Core/Schedulers.pm index 230a423..fa47d11 100755 --- a/lib/MasterServer/Core/Schedulers.pm +++ b/lib/MasterServer/Core/Schedulers.pm @@ -18,7 +18,7 @@ sub long_periodic_tasks { return AnyEvent->timer ( after => 90, # grace time receiving beacons - interval => 3600, + interval => 1800, cb => sub { # update Killing Floor stats @@ -37,8 +37,9 @@ sub long_periodic_tasks { # get serverlist my $masterserverlist = $self->get_server( - updated => 7200, gamename => "333networks", + $self->{firstrun} ? ( + updated => 7200 ) : (), ); foreach my $ms (@{$masterserverlist}) { @@ -53,7 +54,7 @@ sub long_periodic_tasks { # do NOT reset $t, keep padding time -- you should not have more than 300 # entries in applets/syncer in total anyway. - # Query Epic Games-based UCC applets periodically to get an additional + # Query Epic Games-alike applets periodically to get an additional # list of online UT, Unreal and other game servers. if ($self->{master_applet_enabled}) { diff --git a/lib/MasterServer/Core/Util.pm b/lib/MasterServer/Core/Util.pm index 5af8264..3ca009d 100755 --- a/lib/MasterServer/Core/Util.pm +++ b/lib/MasterServer/Core/Util.pm @@ -54,8 +54,8 @@ sub valid_address { my $val_addr = ($a =~ '^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$') if $a; my $val_port = ($p =~ m/^\d+$/ && 0 < $p && $p <= 65535) if $p; - # exclude addresses where we don't want people sniffing - for (qw|192.168.(.\d*).(.\d*) 127.0.(.\d*).(.\d*) 10.0.(.\d*).(.\d*)|){$val_addr = 0 if ($a =~ m/$_/)} + # exclude local addresses + if ($a =~ m/192.168.(\d).(\d)/ || $a =~ m/127.0.(\d).(\d)/ || $a =~ m/10.0.(\d).(\d)/) { $val_addr = 0; } # only return true if both are valid return ($val_addr && $val_port); diff --git a/lib/MasterServer/Core/Version.pm b/lib/MasterServer/Core/Version.pm index 0b4d058..277cd04 100755 --- a/lib/MasterServer/Core/Version.pm +++ b/lib/MasterServer/Core/Version.pm @@ -27,13 +27,13 @@ sub version { $self->{build_type} = "333networks Masterserver-Perl Multidb"; # version - $self->{build_version} = "2.4.0"; + $self->{build_version} = "2.4.1"; # short version for uplinks $self->{short_version} = "MS-perl $self->{build_version}"; # date yyyy-mm-dd - $self->{build_date} = "2017-08-22"; + $self->{build_date} = "2017-09-25"; #author, email $self->{build_author} = "Darkelarious, darkelarious\@333networks.com"; |
