summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArian <arianroeloffzen@gmail.com>2014-10-28 00:08:29 +0100
committerArian <arianroeloffzen@gmail.com>2014-10-28 00:08:29 +0100
commitc0c1a9ceea0a2231f7365c47cda933dcc18a44ed (patch)
tree39336dc2a6e93e5b3bc90bfd70bae74bb269eddf
parentUpdate login_template.html (diff)
downloadcuberite-c0c1a9ceea0a2231f7365c47cda933dcc18a44ed.tar
cuberite-c0c1a9ceea0a2231f7365c47cda933dcc18a44ed.tar.gz
cuberite-c0c1a9ceea0a2231f7365c47cda933dcc18a44ed.tar.bz2
cuberite-c0c1a9ceea0a2231f7365c47cda933dcc18a44ed.tar.lz
cuberite-c0c1a9ceea0a2231f7365c47cda933dcc18a44ed.tar.xz
cuberite-c0c1a9ceea0a2231f7365c47cda933dcc18a44ed.tar.zst
cuberite-c0c1a9ceea0a2231f7365c47cda933dcc18a44ed.zip
-rw-r--r--MCServer/webadmin/template.lua23
1 files changed, 21 insertions, 2 deletions
diff --git a/MCServer/webadmin/template.lua b/MCServer/webadmin/template.lua
index fc0d8837a..b3c84dee2 100644
--- a/MCServer/webadmin/template.lua
+++ b/MCServer/webadmin/template.lua
@@ -23,11 +23,30 @@ end
function GetDefaultPage()
local PM = cRoot:Get():GetPluginManager()
- local SubTitle = "Home"
+ local SubTitle = "Current Game"
local Content = ""
- Content = Content .. "<h4>Home Home Home</h4><ul>I have no idea what this content should do.</ul>"
+ Content = Content .. "<h4>Server Name:</h4>"
+ Content = Content .. "<p>" .. cRoot:Get():GetServer():GetServerID() .. "</p>"
+ Content = Content .. "<h4>Plugins:</h4><ul>"
+ local AllPlugins = PM:GetAllPlugins()
+ for key,value in pairs(AllPlugins) do
+ if( value ~= nil and value ~= false ) then
+ Content = Content .. "<li>" .. key .. " (version " .. value:GetVersion() .. ")</li>"
+ end
+ end
+
+ Content = Content .. "</ul>"
+ Content = Content .. "<h4>Players:</h4><ul>"
+
+ local AddPlayerToTable = function( Player )
+ Content = Content .. "<li>" .. Player:GetName() .. "</li>"
+ end
+ cRoot:Get():ForEachPlayer( AddPlayerToTable )
+
+ Content = Content .. "</ul><br>";
+
return Content, SubTitle
end