diff options
author | STRWarrior <STRWarrior@users.noreply.github.com> | 2014-08-30 22:42:38 +0200 |
---|---|---|
committer | STRWarrior <STRWarrior@users.noreply.github.com> | 2014-08-30 22:42:38 +0200 |
commit | 9f321e29cf50c5cdd828fa1bbce1de2f0cbbc58e (patch) | |
tree | a6ad2990fdaff104c3663a8655be26ad55dc1ccc /src/Root.cpp | |
parent | WSSAnvil: Removed leftover debugging code. (diff) | |
parent | Fixed style. (diff) | |
download | cuberite-9f321e29cf50c5cdd828fa1bbce1de2f0cbbc58e.tar cuberite-9f321e29cf50c5cdd828fa1bbce1de2f0cbbc58e.tar.gz cuberite-9f321e29cf50c5cdd828fa1bbce1de2f0cbbc58e.tar.bz2 cuberite-9f321e29cf50c5cdd828fa1bbce1de2f0cbbc58e.tar.lz cuberite-9f321e29cf50c5cdd828fa1bbce1de2f0cbbc58e.tar.xz cuberite-9f321e29cf50c5cdd828fa1bbce1de2f0cbbc58e.tar.zst cuberite-9f321e29cf50c5cdd828fa1bbce1de2f0cbbc58e.zip |
Diffstat (limited to 'src/Root.cpp')
-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 ef66f9870..f04cbf08b 100644 --- a/src/Root.cpp +++ b/src/Root.cpp @@ -468,16 +468,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)); @@ -489,14 +479,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()); |