2013-03-24 11:44:44 -04:00
|
|
|
function HandleRequest_ManageServer( Request )
|
|
|
|
local Content = ""
|
|
|
|
if( Request.PostParams["RestartServer"] ~= nil ) then
|
2013-05-06 09:35:04 -04:00
|
|
|
cRoot:Get():ExecuteConsoleCommand("restart")
|
2013-03-24 11:44:44 -04:00
|
|
|
elseif( Request.PostParams["ReloadServer"] ~= nil ) then
|
|
|
|
cRoot:Get():GetPluginManager():ReloadPlugins()
|
|
|
|
elseif( Request.PostParams["StopServer"] ~= nil ) then
|
2013-05-06 09:35:04 -04:00
|
|
|
cRoot:Get():ExecuteConsoleCommand("stop")
|
2013-03-24 11:44:44 -04:00
|
|
|
end
|
|
|
|
Content = Content .. [[
|
|
|
|
<form method="POST">]]
|
|
|
|
|
|
|
|
Content = Content .. [[<table>
|
|
|
|
<tr style="padding-top:5px;">
|
|
|
|
<td><input type="submit" value="Restart Server" name="RestartServer"> <br /> restart the server</td>
|
|
|
|
<td><input type="submit" value="Reload Server" name="ReloadServer"> <br /> reload the server</td>
|
|
|
|
<td><input type="submit" value="Stop Server" name="StopServer"> <br /> stop the server</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
]]
|
|
|
|
return Content
|
|
|
|
end
|
|
|
|
|