1
0

Fixed server stopping after #363 fix

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1422 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com 2013-04-27 21:14:31 +00:00
parent 8418c7ba9a
commit 384e6603c4

View File

@ -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;
}
}