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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user