From 983d87e44356c4cfc8f8908ec365006323a4dbe0 Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Sat, 27 Jul 2013 16:24:03 +0100 Subject: Added correct core plugin --- MCServer/Plugins/Core/web_manageserver.lua | 35 ++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 MCServer/Plugins/Core/web_manageserver.lua (limited to 'MCServer/Plugins/Core/web_manageserver.lua') diff --git a/MCServer/Plugins/Core/web_manageserver.lua b/MCServer/Plugins/Core/web_manageserver.lua new file mode 100644 index 000000000..a2936c1a8 --- /dev/null +++ b/MCServer/Plugins/Core/web_manageserver.lua @@ -0,0 +1,35 @@ +function HandleRequest_ManageServer( Request ) + local Content = "" + if (Request.PostParams["RestartServer"] ~= nil) then + cRoot:Get():QueueExecuteConsoleCommand("restart"); + elseif (Request.PostParams["ReloadServer"] ~= nil) then + cRoot:Get():GetPluginManager():ReloadPlugins(); + elseif (Request.PostParams["StopServer"] ~= nil) then + cRoot:Get():QueueExecuteConsoleCommand("stop"); + elseif (Request.PostParams["WorldSaveAllChunks"] ~= nil) then + cRoot:Get():GetWorld(Request.PostParams["WorldSaveAllChunks"]):SaveAllChunks(); + end + Content = Content .. [[ +
+ + +
+
+
+ +
Manage Server
restart the server
reload the server
stop the server
+ + + ]] + local LoopWorlds = function( World ) + Content = Content .. [[ +
+ + ]] + end + cRoot:Get():ForEachWorld( LoopWorlds ) + Content = Content .. "
Manage Worlds
Save all the chunks of world ]] .. World:GetName() .. [[
" + + return Content +end + -- cgit v1.2.3