mirror of
https://github.com/minetest/minetest.git
synced 2024-11-30 19:43:45 +01:00
c62bab010f
Add lag reporting to masterserver (average dtime) StyledWriter -> FastWriter in masterserver announce
75 lines
2.7 KiB
Plaintext
75 lines
2.7 KiB
Plaintext
{{? !master.no_total}}
|
|
<div class="total">
|
|
Players: {{=it.total.clients}}/{{=it.total_max.clients}}
|
|
Servers: {{=it.total.servers}}/{{=it.total_max.servers}}
|
|
</div>
|
|
{{?}}
|
|
<table>
|
|
<tr>
|
|
{{? !master.no_address}}<th>IP[:Port]</th>{{?}}
|
|
{{? !master.no_clients}}<th>Players/Max{{? !master.no_avgtop}}<br/>Avg/Top{{?}}</th>{{?}}
|
|
{{? !master.no_version}}<th>Version, Gameid, MapGen</th>{{?}}
|
|
{{? !master.no_name}}<th>Name</th>{{?}}
|
|
{{? !master.no_description}}<th>Description</th>{{?}}
|
|
{{? !master.no_flags}}<th>Flags</th>{{?}}
|
|
{{? !master.no_uptime}}<th>Uptime, Age</th>{{?}}
|
|
{{? !master.no_ping}}<th>Ping, Lag</th>{{?}}
|
|
</tr>
|
|
{{~it.list :server:index}}
|
|
{{ if (master.limit && index + 1 > master.limit) break;}}
|
|
{{ if (master.min_clients && server.clients < master.min_clients) continue;}}
|
|
<tr>
|
|
{{? !master.no_address}}
|
|
<td class ="address">
|
|
{{=addressString(server)}}
|
|
</td>{{?}}
|
|
{{? !master.no_clients}}
|
|
<td class="clients{{? server.clients_list && server.clients_list.length > 0}} mts_hover_list_text{{?}}">
|
|
{{=server.clients}}/{{=server.clients_max}}{{? !master.no_avgtop}} {{=Math.floor(server.pop_v)}}/{{=server.clients_top}}{{?}}
|
|
{{=hoverList("Clients", server.clients_list)}}
|
|
</td>{{?}}
|
|
{{? !master.no_version}}
|
|
<td class="version{{? server.mods && server.mods.length > 0}} mts_hover_list_text{{?}}">
|
|
{{=escapeHTML(server.version)}}, {{=escapeHTML(server.gameid)}},
|
|
{{=escapeHTML(server.mapgen || '?')}}
|
|
{{=hoverList("Mods", server.mods)}}
|
|
</td>{{?}}
|
|
{{? !master.no_name}}
|
|
<td class="name">
|
|
{{? server.url}}
|
|
<a href="{{=escapeHTML(server.url)}}">{{=tooltipString(server.name, 25)}}</a>
|
|
{{??}}
|
|
{{=tooltipString(server.name, 25)}}
|
|
{{?}}
|
|
</td>{{?}}
|
|
{{? !master.no_description}}
|
|
<td class="description">
|
|
{{=tooltipString(server.description, 50)}}
|
|
</td>{{?}}
|
|
{{? !master.no_flags}}
|
|
<td class="flags {{? server.privs}} mts_hover_list_text{{?}}">
|
|
{{=hoverString("Privs", server.privs)}}
|
|
{{=server.creative ? 'Cre ' : ''}}
|
|
{{=server.dedicated ? 'Ded ' : ''}}
|
|
{{=server.damage ? 'Dmg ' : ''}}
|
|
{{=server.liquid_finite ? 'Liq ' : ''}}
|
|
{{=server.pvp ? 'PvP ' : ''}}
|
|
{{=server.password ? 'Pwd ' : ''}}
|
|
{{=server.rollback ? 'Rol ' : ''}}
|
|
{{=server.can_see_far_names ? 'Far ' : ''}}
|
|
</td>{{?}}
|
|
{{? !master.no_uptime}}
|
|
<td class="uptime">
|
|
{{=humanTime(server.uptime)}}, {{=humanTime(server.game_time)}}
|
|
</td>{{?}}
|
|
{{? !master.no_ping}}
|
|
<td class="ping">
|
|
{{=Math.floor(server.ping * 1000)}}{{? server.lag}}, {{= Math.floor(server.lag * 1000)}}{{?}}
|
|
</td>{{?}}
|
|
</tr>
|
|
{{~}}
|
|
</table>
|
|
{{? master.min_clients || master.limit}}
|
|
<a class="clickable" onclick="delete master.min_clients; delete master.limit; get();">More...</a>
|
|
{{?}}
|