aboutsummaryrefslogtreecommitdiff
path: root/src/trinitycore/CliRunnable.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2008-11-20 16:16:57 -0600
committermegamage <none@none>2008-11-20 16:16:57 -0600
commit1e997b95cc89c615adf2acd27a5f6916b78e0ff3 (patch)
tree491c496b798daf9b20db6397ae3f0affb6fd3738 /src/trinitycore/CliRunnable.cpp
parent0b61584e1b19afb8dbef376a4e2903d8631bfc1d (diff)
Re-commit 262 due to EOL issues. (no difference from 262)
--HG-- branch : trunk
Diffstat (limited to 'src/trinitycore/CliRunnable.cpp')
-rw-r--r--src/trinitycore/CliRunnable.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/trinitycore/CliRunnable.cpp b/src/trinitycore/CliRunnable.cpp
index 065a6662a50..0af892819b6 100644
--- a/src/trinitycore/CliRunnable.cpp
+++ b/src/trinitycore/CliRunnable.cpp
@@ -169,7 +169,7 @@ bool ChatHandler::HandleCharacterDeleteCommand(const char* args)
bool ChatHandler::HandleServerExitCommand(const char* args)
{
SendSysMessage(LANG_COMMAND_EXIT);
- World::m_stopEvent = true;
+ World::StopNow(SHUTDOWN_EXIT_CODE);
return true;
}
@@ -310,14 +310,14 @@ void CliRunnable::run()
printf("TC>");
///- As long as the World is running (no World::m_stopEvent), get the command line and handle it
- while (!World::m_stopEvent)
+ while (!World::IsStopped())
{
fflush(stdout);
#ifdef linux
- while (!kb_hit_return() && !World::m_stopEvent)
+ while (!kb_hit_return() && !World::IsStopped())
// With this, we limit CLI to 10commands/second
usleep(100);
- if (World::m_stopEvent)
+ if (World::IsStopped())
break;
#endif
char *command_str = fgets(commandbuf,sizeof(commandbuf),stdin);
@@ -348,7 +348,7 @@ void CliRunnable::run()
}
else if (feof(stdin))
{
- World::m_stopEvent = true;
+ World::StopNow(SHUTDOWN_EXIT_CODE);
}
}