From 5e433fa913cc21d4d3c9ba1ef341c3c7aedc128c Mon Sep 17 00:00:00 2001 From: proller Date: Sat, 3 Aug 2013 03:02:59 +0400 Subject: More info in serverlist --- util/master/list.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'util/master/list.js') diff --git a/util/master/list.js b/util/master/list.js index 15319e1c9..f428a1cd1 100644 --- a/util/master/list.js +++ b/util/master/list.js @@ -41,7 +41,7 @@ function human_time(t, abs) { function success(r) { if (!r || !r.list) return; - var h = ''; + var h = '
ip[:port]clients/maxversion gameidnamedescriptionflagsuptimeping
'; for (var i = 0; i < r.list.length; ++i) { var s = r.list[i]; if (!s) continue; @@ -49,13 +49,13 @@ function success(r) { h += ''; h += ''; h += ''; - var mods; + var mods = 0; if (s.mods && jQuery.isArray(s.mods)) { mods = s.mods.length; } - h += ''; h += ''; - h += ''; + h += ''; if (!s.start || s.start < 0) s.start = 0; h += ''; h += ''; -- cgit v1.2.3
ip[:port]clients/maxversion gameid mapgennamedescriptionflagsuptimeping
' + e(s.address) + (s.port != 30000 ? (':' + e(s.port)) : '') + '' + e(s.clients) + (s.clients_max ? '/' + e(s.clients_max) : '') + (s.clients_top ? ', ' + s.clients_top : '') + '' + e(s.version) + ' ' + e(s.gameid); + h += '' + e(s.version) + ' ' + e(s.gameid) ' ' + e(s.mapgen); if (mods) { - h += '
Mods:
'; + h += '
Mods ('+mods+'):
'; for (m in s.mods) { h += s.mods[m] + '
'; } @@ -70,7 +70,15 @@ function success(r) { if (s.url) h += ''; h += '
' + e(s.description) + '' + e(s.password ? 'Pwd ' : '') + (s.creative ? 'Cre ' : '') + (s.damage ? 'Dmg ' : '') + (s.pvp ? 'Pvp ' : '') + (s.dedicated ? 'Ded ' : '') + (s.rollback ? 'Rol ' : '') + '' + + (s.password ? 'Pwd ' : '') + + (s.creative ? 'Cre ' : '') + + (s.damage ? 'Dmg ' : '') + + (s.pvp ? 'Pvp ' : '') + + (s.dedicated ? 'Ded ' : '') + + (s.rollback ? 'Rol ' : '') + + (s.liquid_finite ? 'Liq ' : '') + + '' + (s.uptime ? human_time(s.uptime, 1) : s.start ? human_time(s.start) : '') + '' + (s.ping ? parseFloat(s.ping).toFixed(3) * 1000 : '') + '