From 4cb52619aa6452083a7f7ddbeea6838cd9aee2b0 Mon Sep 17 00:00:00 2001 From: Jaidyn Ann Date: Tue, 3 Aug 2021 14:32:30 -0500 Subject: [PATCH] Fix handling of commands (barring /me) --- application/Conversation.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/application/Conversation.cpp b/application/Conversation.cpp index 9dfa90b..10ed206 100644 --- a/application/Conversation.cpp +++ b/application/Conversation.cpp @@ -166,13 +166,12 @@ Conversation::ImMessage(BMessage* msg) BString args = CommandArgs(body); ChatCommand* cmd = _GetServer()->CommandById(name, fLooper->GetInstance()); - if (cmd == NULL && name != "me") { - _WarnUser(BString(B_TRANSLATE("That isn't a valid command. " - "Try /help for a list."))); - break; - } - else { - fMessenger.SendMessage(msg); + if (cmd == NULL) { + if (name == "me") + fMessenger.SendMessage(msg); + else + _WarnUser(BString(B_TRANSLATE("That isn't a valid command. " + "Try /help for a list."))); break; }