summaryrefslogtreecommitdiffstats
path: root/MCServer/webadmin/template.lua
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-12-30 10:34:37 +0100
committerMattes D <github@xoft.cz>2014-12-30 10:34:37 +0100
commit7a400bdcd17b2600919cf492b454f3e1be8a86ff (patch)
treed88b1822c5c5a6d1b53cbb9e03f7b3ec04ef7a27 /MCServer/webadmin/template.lua
parentAdd make as a required program for *nix (diff)
parentUse cRoot:Get():GetServer():GetNumPlayers() instead of a custom function. (diff)
downloadcuberite-7a400bdcd17b2600919cf492b454f3e1be8a86ff.tar
cuberite-7a400bdcd17b2600919cf492b454f3e1be8a86ff.tar.gz
cuberite-7a400bdcd17b2600919cf492b454f3e1be8a86ff.tar.bz2
cuberite-7a400bdcd17b2600919cf492b454f3e1be8a86ff.tar.lz
cuberite-7a400bdcd17b2600919cf492b454f3e1be8a86ff.tar.xz
cuberite-7a400bdcd17b2600919cf492b454f3e1be8a86ff.tar.zst
cuberite-7a400bdcd17b2600919cf492b454f3e1be8a86ff.zip
Diffstat (limited to 'MCServer/webadmin/template.lua')
-rw-r--r--MCServer/webadmin/template.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/MCServer/webadmin/template.lua b/MCServer/webadmin/template.lua
index 4d3934da8..6ea7b69bc 100644
--- a/MCServer/webadmin/template.lua
+++ b/MCServer/webadmin/template.lua
@@ -58,6 +58,7 @@ function ShowPage(WebAdmin, TemplateRequest)
SiteContent = {}
local BaseURL = WebAdmin:GetBaseURL(TemplateRequest.Request.Path)
local Title = "MCServer WebAdmin"
+ local NumPlayers = cRoot:Get():GetServer():GetNumPlayers()
local MemoryUsageKiB = cRoot:GetPhysicalRAMUsage()
local NumChunks = cRoot:Get():GetTotalChunkCount()
local PluginPage = WebAdmin:GetPage(TemplateRequest.Request)
@@ -102,6 +103,7 @@ function ShowPage(WebAdmin, TemplateRequest)
<div class="wrapper">
<ul class="menu top_links">
<li><a>Server Name: <strong>]] .. cRoot:Get():GetServer():GetServerID() .. [[</strong></a></li>
+ <li><a>Players online: <strong>]] .. NumPlayers .. [[</strong></a></li>
<li><a>Memory: <strong>]] .. MemoryUsageKiB / 1024 .. [[MB</strong></a></li>
<li><a>Chunks: <strong>]] .. NumChunks .. [[</strong></a></li>
</ul>