aboutsummaryrefslogtreecommitdiff
path: root/lib/MasterServer/Database/Pg/dbClientList.pm
diff options
context:
space:
mode:
authorDarkelarious <darkelarious@333networks.com>2016-11-19 20:56:04 +0100
committerDarkelarious <darkelarious@333networks.com>2016-11-19 20:56:04 +0100
commitc3f8d65a4fb1f5674557ee67cf7f74369df86ad1 (patch)
tree92aab2a394bda28da0ed7c7c75e633fdf386fc71 /lib/MasterServer/Database/Pg/dbClientList.pm
parent1de3da4b8027508a91144639455c934fd6ccb9b7 (diff)
downloadMasterServer-Perl-c3f8d65a4fb1f5674557ee67cf7f74369df86ad1.tar.gz
MasterServer-Perl-c3f8d65a4fb1f5674557ee67cf7f74369df86ad1.zip
Massive improvements on efficiency, robustness, security, reliability and more
Diffstat (limited to 'lib/MasterServer/Database/Pg/dbClientList.pm')
-rwxr-xr-xlib/MasterServer/Database/Pg/dbClientList.pm45
1 files changed, 0 insertions, 45 deletions
diff --git a/lib/MasterServer/Database/Pg/dbClientList.pm b/lib/MasterServer/Database/Pg/dbClientList.pm
deleted file mode 100755
index 718bf8a..0000000
--- a/lib/MasterServer/Database/Pg/dbClientList.pm
+++ /dev/null
@@ -1,45 +0,0 @@
-
-package MasterServer::Database::Pg::dbClientList;
-
-use strict;
-use warnings;
-use Exporter 'import';
-
-our @EXPORT = qw| get_gamenames
- get_game_list |;
-
-
-################################################################################
-## get a list of distinct gamenames currently in the database. it does not
-## matter whether they are recent or old, as long as the game is currently in
-## the database.
-##
-## returns: hashref of gamenames
-################################################################################
-sub get_gamenames {
- my $self = shift;
-
- return $self->{dbh}->selectall_arrayref(
- "SELECT distinct gamename
- FROM serverlist");
-}
-
-################################################################################
-## get the list of games of a certain $gamename, excluding the ones excempted
-## via the blacklist
-## only returns server addresses that are no more than 1 hours old
-################################################################################
-sub get_game_list {
- my ($self, $gamename) = @_;
-
- return $self->{dbh}->selectall_arrayref(
- "SELECT ip, port
- FROM serverlist
- WHERE updated > (NOW() - INTERVAL '1 HOUR')
- AND gamename = ?
- AND NOT blacklisted",
- undef, lc $gamename);
-}
-
-
-1;