diff options
Diffstat (limited to 'lib/MasterWebInterface')
| -rwxr-xr-x | lib/MasterWebInterface/Database/Pg/Servers.pm | 2 | ||||
| -rwxr-xr-x | lib/MasterWebInterface/Database/SQLite/Servers.pm | 2 | ||||
| -rwxr-xr-x | lib/MasterWebInterface/Handler/Extra/JSON.pm | 1 | ||||
| -rwxr-xr-x | lib/MasterWebInterface/Handler/FrontPage.pm | 2 | ||||
| -rwxr-xr-x | lib/MasterWebInterface/Handler/ServInfo.pm | 6 | ||||
| -rwxr-xr-x | lib/MasterWebInterface/Handler/Tools/Version.pm | 6 |
6 files changed, 12 insertions, 7 deletions
diff --git a/lib/MasterWebInterface/Database/Pg/Servers.pm b/lib/MasterWebInterface/Database/Pg/Servers.pm index 0ed47b1..28b9b7a 100755 --- a/lib/MasterWebInterface/Database/Pg/Servers.pm +++ b/lib/MasterWebInterface/Database/Pg/Servers.pm @@ -45,6 +45,8 @@ sub dbServerListGet { ? ('hostname ILIKE ?' => "%$o{search}%") : (), $o{updated} ? ('serverlist.updated > to_timestamp(?)' => (time-$o{updated}) ) : (), + $o{filter} + ? ('blacklisted = CAST(? AS BOOLEAN)' => 0) : (), ('length(hostname) > ?' => 1), # don't allow empty hostnames ('hostport > ?' => 0), # or games with empty hostport ); diff --git a/lib/MasterWebInterface/Database/SQLite/Servers.pm b/lib/MasterWebInterface/Database/SQLite/Servers.pm index 041c4d9..538eadf 100755 --- a/lib/MasterWebInterface/Database/SQLite/Servers.pm +++ b/lib/MasterWebInterface/Database/SQLite/Servers.pm @@ -43,6 +43,8 @@ sub dbServerListGet { ? ('lower(hostname) LIKE lower(?)' => "%$o{search}%") : (), $o{updated} ? ('serverlist.updated > datetime(?, \'unixepoch\')' => (time-$o{updated})) : (), + $o{filter} + ? ('blacklisted = ?' => 0) : (), # ('length(hostname) > ?' => 1), # don't show empty hostnames ('hostport > ?' => 0), # or games with empty hostport ); diff --git a/lib/MasterWebInterface/Handler/Extra/JSON.pm b/lib/MasterWebInterface/Handler/Extra/JSON.pm index 9d6c56f..8283718 100755 --- a/lib/MasterWebInterface/Handler/Extra/JSON.pm +++ b/lib/MasterWebInterface/Handler/Extra/JSON.pm @@ -38,6 +38,7 @@ sub serverlist_json { search => $f->{q}, gamename => $gamename, page => $f->{p}, + filter => 1, ); # return json data as the response diff --git a/lib/MasterWebInterface/Handler/FrontPage.pm b/lib/MasterWebInterface/Handler/FrontPage.pm index f57c8e1..ce13ab5 100755 --- a/lib/MasterWebInterface/Handler/FrontPage.pm +++ b/lib/MasterWebInterface/Handler/FrontPage.pm @@ -28,7 +28,7 @@ sub main { $self->htmlHeader(title => "Welcome"); # load NEW SERVERS list from database - my ($list, $np, $p) = $self->dbServerListGet(results => 8, sort => 'added', reverse => 1); + my ($list, $np, $p) = $self->dbServerListGet(results => 8, sort => 'added', reverse => 1, filter => 1); my $odd = 0; # print list of new servers added to the database diff --git a/lib/MasterWebInterface/Handler/ServInfo.pm b/lib/MasterWebInterface/Handler/ServInfo.pm index e0aff47..3987e8c 100755 --- a/lib/MasterWebInterface/Handler/ServInfo.pm +++ b/lib/MasterWebInterface/Handler/ServInfo.pm @@ -206,9 +206,9 @@ sub show_server { Tr; td "Flags: "; td; - i ($info->{b333ms} ? "direct uplink, " : "applet or manual, "); - i ($info->{blacklisted} ? "blacklisted, " : "not blacklisted, "); - i ($info->{password} ? "passworded" : "not passworded"); + ($info->{b333ms} ? span class => "g", "direct uplink, " : span class => "o", "applet or manual, "); + ($info->{blacklisted} ? span class => "r", "blacklisted, " : span class => "g", "not blacklisted, "); + ($info->{password} ? span class => "y", "passworded" : span class => "g", "not passworded"); end; end; end; diff --git a/lib/MasterWebInterface/Handler/Tools/Version.pm b/lib/MasterWebInterface/Handler/Tools/Version.pm index 9ffe41a..db306a1 100755 --- a/lib/MasterWebInterface/Handler/Tools/Version.pm +++ b/lib/MasterWebInterface/Handler/Tools/Version.pm @@ -29,9 +29,9 @@ sub version { p "This MasterServer Interface has the following version information:"; table; - Tr; td "build_type"; td "333networks Masterserver Development Interface ";end; - Tr; td "build_version"; td "3.0.0";end; - Tr; td "build_date"; td "2017-09-25";end; + Tr; td "build_type"; td "333networks Masterserver Web Interface ";end; + Tr; td "build_version"; td "3.0.1";end; + Tr; td "build_date"; td "2017-09-27";end; Tr; td "build_author"; td "Darkelarious, darkelarious\@333networks.com";end; end; |
