From: proller Date: Fri, 29 Mar 2013 22:36:06 +0000 (+0400) Subject: Fix backward compatibility for server uptime in master server web page X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=177ca4f4d55368718eb295f1010ad5c81660af57;p=zefram%2Fminetest%2Fminetest_engine.git Fix backward compatibility for server uptime in master server web page --- diff --git a/util/master/list.js b/util/master/list.js index 18cbc4b6..990bb6de 100644 --- a/util/master/list.js +++ b/util/master/list.js @@ -54,9 +54,8 @@ function success(r) { h += ''; h += '' + e(s.description) + ''; h += '' + e(s.password ? 'Pwd ' : '') + (s.creative ? 'Cre ' : '') + (s.damage ? 'Dmg ' : '') + (s.pvp ? 'Pvp ' : '') + (s.dedicated ? 'Ded ' : '') + ''; - if (!s.time || s.time < 0) s.time = 0; if (!s.start || s.start < 0) s.start = 0; - h += '' + (s.uptime ? human_time(s.uptime, 1) : '') + ''; + h += '' + (s.uptime ? human_time(s.uptime, 1) : s.start ? human_time(s.start) : '') + ''; h += '' + (s.ping ? parseFloat(s.ping).toFixed(3) * 1000 : '') + ''; h += ''; }