diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-08-18 12:38:15 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-08-18 12:38:15 +0200 |
commit | 1b5eaa92b562c09ed7cea4de7186ff6541e65e5f (patch) | |
tree | 7e196c6021c1777d25ad4d79bb6530fd933a65d4 /source/cRoot.cpp | |
parent | Packet refactoring, phase two, partial. Rewritten a few packet handling functions not to use cPacket-descendant objects. (diff) | |
download | cuberite-1b5eaa92b562c09ed7cea4de7186ff6541e65e5f.tar cuberite-1b5eaa92b562c09ed7cea4de7186ff6541e65e5f.tar.gz cuberite-1b5eaa92b562c09ed7cea4de7186ff6541e65e5f.tar.bz2 cuberite-1b5eaa92b562c09ed7cea4de7186ff6541e65e5f.tar.lz cuberite-1b5eaa92b562c09ed7cea4de7186ff6541e65e5f.tar.xz cuberite-1b5eaa92b562c09ed7cea4de7186ff6541e65e5f.tar.zst cuberite-1b5eaa92b562c09ed7cea4de7186ff6541e65e5f.zip |
Diffstat (limited to 'source/cRoot.cpp')
-rw-r--r-- | source/cRoot.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/cRoot.cpp b/source/cRoot.cpp index 81e7daccb..643b4105b 100644 --- a/source/cRoot.cpp +++ b/source/cRoot.cpp @@ -75,18 +75,18 @@ cRoot::~cRoot() -void cRoot::InputThread(void* a_Params) +void cRoot::InputThread(void * a_Params) { #if defined(ANDROID_NDK) return; #else - cRoot& self = *(cRoot*)a_Params; + cRoot & self = *(cRoot*)a_Params; - while( !(self.m_bStop || self.m_bRestart) ) + while (!(self.m_bStop || self.m_bRestart)) { std::string Command; std::getline(std::cin, Command); - self.ServerCommand( Command.c_str() ); + self.ServerCommand(Command); } #endif } @@ -351,15 +351,15 @@ void cRoot::TickWorlds( float a_Dt ) -void cRoot::ServerCommand( const char * a_Cmd ) +void cRoot::ServerCommand(const AString & a_Cmd) { - LOG("Server console command: \"%s\"", a_Cmd ); - m_Server->ServerCommand( a_Cmd ); - if( strcmp(a_Cmd, "stop") == 0 ) + LOG("Server console command: \"%s\"", a_Cmd.c_str()); + m_Server->ServerCommand(a_Cmd); + if (a_Cmd == "stop") { m_bStop = true; } - else if( strcmp( a_Cmd, "restart") == 0 ) + else if (a_Cmd == "restart") { m_bRestart = true; } |