1
0
cuberite-2a/Plugins/Core/web_reload.lua
faketruth c142424571 Can now receive POST data in WebPlugins!
Fixed Debug With optimized Noise in VS2010 by having it run the correct MCServer_debug.exe instead of MCServer.exe
Changed winsock.h to Winsock2.h in Globals.h so sockets can be graciously closed (See webserver Socket::Close() )

git-svn-id: http://mc-server.googlecode.com/svn/trunk@197 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-01-31 00:38:18 +00:00

15 lines
651 B
Lua

function HandleRequest_Reload( Request )
local Content = ""
if( Request.PostParams:get("reload") ~= "" ) then
Content = Content .. "<head><meta http-equiv=\"refresh\" content=\"2;././\"></head>"
Content = Content .. "<p>Reloading plugins... This can take a while depending on the plugins you're using.</p>"
cRoot:Get():GetPluginManager():ReloadPlugins()
else
Content = Content .. "<form method=POST>"
Content = Content .. "<p>Click the reload button to reload all plugins!<br>"
Content = Content .. "<input type=\"submit\" name=\"reload\" value=\"Reload!\"></p>"
Content = Content .. "</form>"
end
return Content
end