1
0

Merge pull request #800 from mc-server/EntireCommandError

The entire unknown command is echoed back to the user on error.
This commit is contained in:
Mattes D 2014-03-15 07:52:37 +01:00
commit 50b53ff3e8

View File

@ -248,7 +248,7 @@ bool cPluginManager::CallHookChat(cPlayer * a_Player, AString & a_Message)
{ {
AStringVector Split(StringSplit(a_Message, " ")); AStringVector Split(StringSplit(a_Message, " "));
ASSERT(!Split.empty()); // This should not happen - we know there's at least one char in the message so the split needs to be at least one item long ASSERT(!Split.empty()); // This should not happen - we know there's at least one char in the message so the split needs to be at least one item long
a_Player->SendMessageInfo(Printf("Unknown command: \"%s\"", Split[0].c_str())); a_Player->SendMessageInfo(Printf("Unknown command: \"%s\"", a_Message.c_str()));
LOGINFO("Player %s issued an unknown command: \"%s\"", a_Player->GetName().c_str(), a_Message.c_str()); LOGINFO("Player %s issued an unknown command: \"%s\"", a_Player->GetName().c_str(), a_Message.c_str());
return true; // Cancel sending return true; // Cancel sending
} }