Fix handling of commands (barring /me)

This commit is contained in:
Jaidyn Ann 2021-08-03 14:32:30 -05:00
parent 984f066070
commit 4cb52619aa

View File

@ -166,13 +166,12 @@ Conversation::ImMessage(BMessage* msg)
BString args = CommandArgs(body); BString args = CommandArgs(body);
ChatCommand* cmd = _GetServer()->CommandById(name, fLooper->GetInstance()); ChatCommand* cmd = _GetServer()->CommandById(name, fLooper->GetInstance());
if (cmd == NULL && name != "me") { if (cmd == NULL) {
_WarnUser(BString(B_TRANSLATE("That isn't a valid command. " if (name == "me")
"Try /help for a list."))); fMessenger.SendMessage(msg);
break; else
} _WarnUser(BString(B_TRANSLATE("That isn't a valid command. "
else { "Try /help for a list.")));
fMessenger.SendMessage(msg);
break; break;
} }