summaryrefslogtreecommitdiffstats
path: root/source/Server.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-11-13 15:56:40 +0100
committermadmaxoft <github@xoft.cz>2013-11-13 15:56:40 +0100
commit1701b628cb63cd59db208266aa87a388d47b151a (patch)
tree2cd73ae768b165473aee762c0b7c3d457e2b1053 /source/Server.cpp
parentcPluginManager:BindCommand() and :BindConsoleComman() now report full Lua stacktrace on failure. (diff)
downloadcuberite-1701b628cb63cd59db208266aa87a388d47b151a.tar
cuberite-1701b628cb63cd59db208266aa87a388d47b151a.tar.gz
cuberite-1701b628cb63cd59db208266aa87a388d47b151a.tar.bz2
cuberite-1701b628cb63cd59db208266aa87a388d47b151a.tar.lz
cuberite-1701b628cb63cd59db208266aa87a388d47b151a.tar.xz
cuberite-1701b628cb63cd59db208266aa87a388d47b151a.tar.zst
cuberite-1701b628cb63cd59db208266aa87a388d47b151a.zip
Diffstat (limited to 'source/Server.cpp')
-rw-r--r--source/Server.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/source/Server.cpp b/source/Server.cpp
index 75ce35cb7..7af575157 100644
--- a/source/Server.cpp
+++ b/source/Server.cpp
@@ -462,6 +462,18 @@ void cServer::ExecuteConsoleCommand(const AString & a_Cmd, cCommandOutputCallbac
return;
}
+ // "help" and "reload" are to be handled by MCS, so that they work no matter what
+ if (split[0] == "help")
+ {
+ PrintHelp(split, a_Output);
+ return;
+ }
+ if (split[0] == "reload")
+ {
+ cPluginManager::Get()->ReloadPlugins();
+ return;
+ }
+
// There is currently no way a plugin can do these (and probably won't ever be):
if (split[0].compare("chunkstats") == 0)
{
@@ -500,9 +512,20 @@ void cServer::ExecuteConsoleCommand(const AString & a_Cmd, cCommandOutputCallbac
+void cServer::PrintHelp(const AStringVector & a_Split, cCommandOutputCallback & a_Output)
+{
+ // TODO
+}
+
+
+
+
+
void cServer::BindBuiltInConsoleCommands(void)
{
cPluginManager * PlgMgr = cPluginManager::Get();
+ PlgMgr->BindConsoleCommand("help", NULL, " - Shows the available commands");
+ PlgMgr->BindConsoleCommand("reload", NULL, " - Reloads all plugins");
PlgMgr->BindConsoleCommand("restart", NULL, " - Restarts the server cleanly");
PlgMgr->BindConsoleCommand("stop", NULL, " - Stops the server cleanly");
PlgMgr->BindConsoleCommand("chunkstats", NULL, " - Displays detailed chunk memory statistics");