From: proller Date: Sat, 13 Jul 2013 00:10:16 +0000 (+0400) Subject: Masterserver mods fix X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=a70993d6d20b4668556a8792ecd952d84a7e6939;p=zefram%2Fminetest%2Fminetest_engine.git Masterserver mods fix --- diff --git a/util/master/list.js b/util/master/list.js index 9e033b60..15319e1c 100644 --- a/util/master/list.js +++ b/util/master/list.js @@ -51,7 +51,7 @@ function success(r) { h += '' + e(s.clients) + (s.clients_max ? '/' + e(s.clients_max) : '') + (s.clients_top ? ', ' + s.clients_top : '') + ''; var mods; if (s.mods && jQuery.isArray(s.mods)) { - mods = 1; + mods = s.mods.length; } h += '' + e(s.version) + ' ' + e(s.gameid); if (mods) { diff --git a/util/master/master.cgi b/util/master/master.cgi index 975fa94e..cb4d164c 100755 --- a/util/master/master.cgi +++ b/util/master/master.cgi @@ -235,7 +235,7 @@ sub request (;$) { $param->{first} ||= $old->{first} || $old->{time} || $param->{time}; $param->{clients_top} = $old->{clients_top} if $old->{clients_top} > $param->{clients}; $param->{clients_top} ||= $param->{clients} || 0; - $param->{mods} ||= $old->{mods} unless $param->{action} ~~ 'start'; + $param->{mods} ||= $old->{mods} if $old->{mods} and !($param->{action} ~~ 'start'); delete $param->{action}; $listk->{$param->{key}} = $param; #printlog Dumper $param;