diff options
author | gvcoman <none@none> | 2008-11-21 14:34:05 -0500 |
---|---|---|
committer | gvcoman <none@none> | 2008-11-21 14:34:05 -0500 |
commit | ae8a27bbb758dd2485d9bea14ccd8b892f626371 (patch) | |
tree | 213402aa6ce31963a4a329cbb261fd88db6a0bdd /src/trinitycore/CliRunnable.cpp | |
parent | 837ce55de88e33825eb66814d07d33c1f869f7a7 (diff) | |
parent | 71707df1dec2aa77864d9a853c34108bb6021138 (diff) |
Merged commit 269 (5f0e38da128a).
--HG--
branch : trunk
Diffstat (limited to 'src/trinitycore/CliRunnable.cpp')
-rw-r--r-- | src/trinitycore/CliRunnable.cpp | 10 |
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); } } |