Core: Updated with new features (contributed by STR_Warrior)
http://forum.mc-server.org/showthread.php?tid=4&pid=6634#pid6634 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1235 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
@@ -125,6 +125,23 @@ function HandleRequest_Chat( Request )
|
||||
end
|
||||
|
||||
if( Request.PostParams["ChatMessage"] ~= nil ) then
|
||||
if( Request.PostParams["ChatMessage"] == "/help" ) then
|
||||
Commands = "Available commands"
|
||||
AddMessage(Commands, "<br>" .. "/help, /reload" )
|
||||
return Commands
|
||||
elseif( Request.PostParams["ChatMessage"] == "/reload" ) then
|
||||
Server = cRoot:Get():GetServer()
|
||||
Server:SendMessage( cChatColor.Green .. "Reloading all plugins." )
|
||||
AddMessage("Reloading all plugins", "")
|
||||
cRoot:Get():GetPluginManager():ReloadPlugins()
|
||||
return ""
|
||||
else
|
||||
cmd = Request.PostParams["ChatMessage"]
|
||||
if string.sub(cmd,1,string.len("/")) == "/" then
|
||||
AddMessage('Unknown Command "' .. Request.PostParams["ChatMessage"] .. '"', "")
|
||||
return ""
|
||||
end
|
||||
end
|
||||
local Message = "[WebAdmin]: " .. Request.PostParams["ChatMessage"]
|
||||
cRoot:Get():GetServer():SendMessage( Message )
|
||||
AddMessage("WebAdmin", Request.PostParams["ChatMessage"] )
|
||||
|
||||
Reference in New Issue
Block a user