From 1b5eaa92b562c09ed7cea4de7186ff6541e65e5f Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sat, 18 Aug 2012 10:38:15 +0000 Subject: Chat packet handled in the new way; fixed missing packet sending for inventory slot. Again, API change! cPlugin:OnChat() has had its parameters swapped, to match all the other callbacks - Player first, Message second git-svn-id: http://mc-server.googlecode.com/svn/trunk@751 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cRoot.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'source/cRoot.cpp') 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; } -- cgit v1.2.3