From 384e6603c4fa3ad3549f97e2703f04b5ebc5c1fb Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sat, 27 Apr 2013 21:14:31 +0000 Subject: [PATCH] Fixed server stopping after #363 fix git-svn-id: http://mc-server.googlecode.com/svn/trunk@1422 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Root.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/source/Root.cpp b/source/Root.cpp index 1e7f48cc9..c7be00c20 100644 --- a/source/Root.cpp +++ b/source/Root.cpp @@ -373,6 +373,16 @@ void cRoot::TickWorlds(float a_Dt) void cRoot::ExecuteConsoleCommand(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(a_Cmd); @@ -386,16 +396,6 @@ void cRoot::DoExecuteConsoleCommand(const AString & a_Cmd) { LOG("Executing console command: \"%s\"", a_Cmd.c_str()); m_Server->ExecuteConsoleCommand(a_Cmd); - - // Some commands are built-in: - if (a_Cmd == "stop") - { - m_bStop = true; - } - else if (a_Cmd == "restart") - { - m_bRestart = true; - } }