diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-08-29 15:43:49 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-08-29 15:43:49 +0200 |
commit | 618741f78e2e840552663590fd0d6eab03aa874e (patch) | |
tree | f5302c5c648ee888479e350a85cf5e809152ed3d /src/Root.cpp | |
parent | Improved explosion damage (diff) | |
download | cuberite-618741f78e2e840552663590fd0d6eab03aa874e.tar cuberite-618741f78e2e840552663590fd0d6eab03aa874e.tar.gz cuberite-618741f78e2e840552663590fd0d6eab03aa874e.tar.bz2 cuberite-618741f78e2e840552663590fd0d6eab03aa874e.tar.lz cuberite-618741f78e2e840552663590fd0d6eab03aa874e.tar.xz cuberite-618741f78e2e840552663590fd0d6eab03aa874e.tar.zst cuberite-618741f78e2e840552663590fd0d6eab03aa874e.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Root.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/Root.cpp b/src/Root.cpp index c20cf0d21..f72f0bae3 100644 --- a/src/Root.cpp +++ b/src/Root.cpp @@ -462,16 +462,6 @@ void cRoot::QueueExecuteConsoleCommand(const AString & a_Cmd, cCommandOutputCall void cRoot::QueueExecuteConsoleCommand(const AString & a_Cmd) { - // Some commands are built-in: - if (a_Cmd == "stop") - { - m_bStop = true; - } - else if (a_Cmd == "restart") - { - m_bRestart = true; - } - // Put the command into a queue (Alleviates FS #363): cCSLock Lock(m_CSPendingCommands); m_PendingCommands.push_back(cCommand(a_Cmd, new cLogCommandDeleteSelfOutputCallback)); @@ -483,14 +473,16 @@ void cRoot::QueueExecuteConsoleCommand(const AString & a_Cmd) void cRoot::ExecuteConsoleCommand(const AString & a_Cmd, cCommandOutputCallback & a_Output) { - // Some commands are built-in: + // cRoot handles stopping and restarting due to our access to controlling variables if (a_Cmd == "stop") { m_bStop = true; + return; } else if (a_Cmd == "restart") { m_bRestart = true; + return; } LOG("Executing console command: \"%s\"", a_Cmd.c_str()); |