aboutsummaryrefslogtreecommitdiff
path: root/lib/MasterServer/TCP
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MasterServer/TCP')
-rwxr-xr-xlib/MasterServer/TCP/Handler.pm2
-rwxr-xr-xlib/MasterServer/TCP/ListCompiler.pm2
-rwxr-xr-xlib/MasterServer/TCP/Syncer.pm6
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/MasterServer/TCP/Handler.pm b/lib/MasterServer/TCP/Handler.pm
index 9d05a32..2fb05f5 100755
--- a/lib/MasterServer/TCP/Handler.pm
+++ b/lib/MasterServer/TCP/Handler.pm
@@ -89,7 +89,7 @@ sub handle_validate {
my $val = 0;
# pass or fail the secure challenge
- if (exists $r->{gamename} && exists $self->{game}->{$r->{gamename}}) {
+ if (exists $r->{gamename} && length $self->get_cipher(lc $r->{gamename}) > 1 ) {
# game exists and we have the key to verify the response
$val = $self->validated_request($r->{gamename}, $secure, $r->{enctype}, $r->{validate});
diff --git a/lib/MasterServer/TCP/ListCompiler.pm b/lib/MasterServer/TCP/ListCompiler.pm
index 56bb256..1863757 100755
--- a/lib/MasterServer/TCP/ListCompiler.pm
+++ b/lib/MasterServer/TCP/ListCompiler.pm
@@ -93,7 +93,7 @@ sub compile_sync {
for my $g (@games) {
# $g is now a gamename -- check if it's supported. Else ignore.
- if (exists $self->{game}->{$g}) {
+ if (length $self->get_cipher(lc $g) > 1) {
# get list from database
my $list = $self->get_game_list($g);
diff --git a/lib/MasterServer/TCP/Syncer.pm b/lib/MasterServer/TCP/Syncer.pm
index 69025f0..2ba52ca 100755
--- a/lib/MasterServer/TCP/Syncer.pm
+++ b/lib/MasterServer/TCP/Syncer.pm
@@ -126,10 +126,10 @@ sub process_sync_list {
# iterate through the gamenames and addresses
while ( my ($gn,$addr) = each %r) {
- # only process gamenames that are in our list for supported games (supportedgames.pl)
- if (defined $gn && exists $self->{game}->{lc $gn}) {
+ # process all games wether we have a cipher for them.
+ if (defined $gn) {
- # database types such as SQLite are slow, therefore use transactions.
+ # some database types, such as SQLite, are slow - therefore use transactions.
$self->{dbh}->begin_work;
# l(ocations, \label\ip:port\) split up in a(ddress) and p(ort)