summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorproller <proller@github.com>2013-08-03 03:02:59 +0400
committerproller <proller@github.com>2013-08-03 03:02:59 +0400
commit5e433fa913cc21d4d3c9ba1ef341c3c7aedc128c (patch)
tree1e5d0892658e5900f8c777f535d609a789bb905a /util
parent0b77588e87b0eeedd624eb0d6c2559aad10104ad (diff)
downloadminetest-5e433fa913cc21d4d3c9ba1ef341c3c7aedc128c.tar.gz
minetest-5e433fa913cc21d4d3c9ba1ef341c3c7aedc128c.tar.bz2
minetest-5e433fa913cc21d4d3c9ba1ef341c3c7aedc128c.zip
More info in serverlist
Diffstat (limited to 'util')
-rw-r--r--util/master/list.js18
1 files changed, 13 insertions, 5 deletions
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 = '<table class="mts_table"><tr class="mts_head"><th>ip[:port]</th><th>clients/max</th><th>version gameid</th><th>name</th><th>description</th><th>flags</th><th>uptime</th><th>ping</th></tr>';
+ var h = '<table class="mts_table"><tr class="mts_head"><th>ip[:port]</th><th>clients/max</th><th>version gameid mapgen</th><th>name</th><th>description</th><th>flags</th><th>uptime</th><th>ping</th></tr>';
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 += '<tr class="mts_row">';
h += '<td class="mts_address">' + e(s.address) + (s.port != 30000 ? (':' + e(s.port)) : '') + '</td>';
h += '<td class="mts_clients">' + e(s.clients) + (s.clients_max ? '/' + e(s.clients_max) : '') + (s.clients_top ? ', ' + s.clients_top : '') + '</td>';
- var mods;
+ var mods = 0;
if (s.mods && jQuery.isArray(s.mods)) {
mods = s.mods.length;
}
- h += '<td class="mts_version' + (mods ? ' mts_ismods' : '') + '">' + e(s.version) + ' ' + e(s.gameid);
+ h += '<td class="mts_version' + (mods ? ' mts_ismods' : '') + '">' + e(s.version) + ' ' + e(s.gameid) ' ' + e(s.mapgen);
if (mods) {
- h += '<div class="mts_mods">Mods:<br/>';
+ h += '<div class="mts_mods">Mods ('+mods+'):<br/>';
for (m in s.mods) {
h += s.mods[m] + '<br/>';
}
@@ -70,7 +70,15 @@ function success(r) {
if (s.url) h += '</a>';
h += '</td>';
h += '<td class="mts_description">' + e(s.description) + '</td>';
- h += '<td class="mts_flags">' + e(s.password ? 'Pwd ' : '') + (s.creative ? 'Cre ' : '') + (s.damage ? 'Dmg ' : '') + (s.pvp ? 'Pvp ' : '') + (s.dedicated ? 'Ded ' : '') + (s.rollback ? 'Rol ' : '') + '</td>';
+ h += '<td class="mts_flags">' +
+ (s.password ? 'Pwd ' : '') +
+ (s.creative ? 'Cre ' : '') +
+ (s.damage ? 'Dmg ' : '') +
+ (s.pvp ? 'Pvp ' : '') +
+ (s.dedicated ? 'Ded ' : '') +
+ (s.rollback ? 'Rol ' : '') +
+ (s.liquid_finite ? 'Liq ' : '') +
+ '</td>';
if (!s.start || s.start < 0) s.start = 0;
h += '<td class="mts_time">' + (s.uptime ? human_time(s.uptime, 1) : s.start ? human_time(s.start) : '') + '</td>';
h += '<td class="mts_ping">' + (s.ping ? parseFloat(s.ping).toFixed(3) * 1000 : '') + '</td>';