Add warning message in case of an unknown command, and do not send
it to the servrer (which typically just confuses it).
This commit is contained in:
parent
683f0fdc07
commit
c3e74d344f
@ -151,20 +151,10 @@ void* NetworkConsole::mainLoop(void* data)
|
||||
}
|
||||
std::cout << "\n";
|
||||
}
|
||||
// FIXME
|
||||
// If STK shuts down, but should receive an input after the network
|
||||
// manager was deleted, the getInstance call will return NULL.
|
||||
else if (NetworkConfig::get()->isclient() &&
|
||||
STKHost::get()->getPeerCount() > 0)
|
||||
else
|
||||
{
|
||||
NetworkString msg(1 + str.size());
|
||||
msg.ai8(0);
|
||||
msg += str;
|
||||
STKHost::get()->getPeers()[0]->sendPacket(msg);
|
||||
Log::info("Console", "Unknown command '%s'.", str.c_str());
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // while !stop
|
||||
|
||||
Protocol *p = new StopServer();
|
||||
|
Loading…
x
Reference in New Issue
Block a user