From 1e6e39f10ac39143a7641839aa9342c9c0c3fd42 Mon Sep 17 00:00:00 2001 From: "nielsbreu@gmail.com" Date: Thu, 13 Jun 2013 17:05:53 +0000 Subject: Added the option of saving all the chunks of a world using the webadmin. FS #354 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1588 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- MCServer/Plugins/Core/web_manageserver.lua | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) (limited to 'MCServer') diff --git a/MCServer/Plugins/Core/web_manageserver.lua b/MCServer/Plugins/Core/web_manageserver.lua index 222736d50..4e8a9a747 100644 --- a/MCServer/Plugins/Core/web_manageserver.lua +++ b/MCServer/Plugins/Core/web_manageserver.lua @@ -6,19 +6,30 @@ function HandleRequest_ManageServer( Request ) cRoot:Get():GetPluginManager():ReloadPlugins() elseif( Request.PostParams["StopServer"] ~= nil ) then cRoot:Get():ExecuteConsoleCommand("stop") + elseif( Request.PostParams["WorldSaveAllChunks"] ~= nil ) then + cRoot:Get():GetWorld(Request.PostParams["WorldSaveAllChunks"]):SaveAllChunks() end Content = Content .. [[ -
]] - - Content = Content .. [[ - - - - - + +

restart the server

reload the server

stop the server
+ +
+
+
+
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