aboutsummaryrefslogtreecommitdiff
path: root/src/trinitycore/CliRunnable.cpp
diff options
context:
space:
mode:
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);
}
}