summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2020-08-27 15:55:11 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2020-08-27 18:32:32 +0200
commit0e3039d44cc215d4b1394c5a64c6e2c01a751b1d (patch)
treea546c8826391bc6f40af38adaa04fca0895523f5
parentFixed windows hack in Compile.sh (#4834) (diff)
downloadcuberite-0e3039d44cc215d4b1394c5a64c6e2c01a751b1d.tar
cuberite-0e3039d44cc215d4b1394c5a64c6e2c01a751b1d.tar.gz
cuberite-0e3039d44cc215d4b1394c5a64c6e2c01a751b1d.tar.bz2
cuberite-0e3039d44cc215d4b1394c5a64c6e2c01a751b1d.tar.lz
cuberite-0e3039d44cc215d4b1394c5a64c6e2c01a751b1d.tar.xz
cuberite-0e3039d44cc215d4b1394c5a64c6e2c01a751b1d.tar.zst
cuberite-0e3039d44cc215d4b1394c5a64c6e2c01a751b1d.zip
Diffstat (limited to '')
-rw-r--r--src/Server.cpp10
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");