diff options
Diffstat (limited to '')
-rw-r--r-- | src/Server.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Server.cpp b/src/Server.cpp index 372437265..d9a0ced27 100644 --- a/src/Server.cpp +++ b/src/Server.cpp @@ -455,7 +455,7 @@ void cServer::ExecuteConsoleCommand(const AString & a_Cmd, cCommandOutputCallbac // "stop" and "restart" are handled in cRoot::ExecuteConsoleCommand, our caller, due to its access to controlling variables - // "help" and "reload" are to be handled by MCS, so that they work no matter what + // "help" and "reload" are to be handled by Cuberite, so that they work no matter what if (split[0] == "help") { PrintHelp(split, a_Output); @@ -475,6 +475,13 @@ void cServer::ExecuteConsoleCommand(const AString & a_Cmd, cCommandOutputCallbac a_Output.Finished(); return; } + else if (split[0] == "reloadweb") + { + cRoot::Get()->GetWebAdmin()->Reload(); + a_Output.Out("WebAdmin configuration reloaded"); + a_Output.Finished(); + return; + } else if (split[0] == "load") { if (split.size() > 1) @@ -617,6 +624,7 @@ void cServer::BindBuiltInConsoleCommands(void) cPluginManager * PlgMgr = cPluginManager::Get(); PlgMgr->BindConsoleCommand("help", nullptr, handler, "Shows the available commands"); PlgMgr->BindConsoleCommand("reload", nullptr, handler, "Reloads all plugins"); + PlgMgr->BindConsoleCommand("reloadweb", nullptr, handler, "Reloads the webadmin configuration"); PlgMgr->BindConsoleCommand("restart", nullptr, handler, "Restarts the server cleanly"); PlgMgr->BindConsoleCommand("stop", nullptr, handler, "Stops the server cleanly"); PlgMgr->BindConsoleCommand("chunkstats", nullptr, handler, "Displays detailed chunk memory statistics"); |