From ae0122e38976ec215b397daac993004c129eed47 Mon Sep 17 00:00:00 2001 From: apa420 Date: Sun, 28 Apr 2019 11:31:34 +0200 Subject: [PATCH] Added a message when an invalid /delete appears --- src/providers/twitch/IrcMessageHandler.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/providers/twitch/IrcMessageHandler.cpp b/src/providers/twitch/IrcMessageHandler.cpp index 26766b1c0..e1c4c7216 100644 --- a/src/providers/twitch/IrcMessageHandler.cpp +++ b/src/providers/twitch/IrcMessageHandler.cpp @@ -552,7 +552,17 @@ void IrcMessageHandler::handleNoticeMessage(Communi::IrcNoticeMessage *message) return; } - channel->addMessage(msg); + QString tags = message->tags().value("msg-id", "").toString(); + if (tags == "bad_delete_message_error" || tags == "usage_delete") + { + channel->addMessage(makeSystemMessage( + "Usage: \"/delete \" - can't take more " + "than one argument")); + } + else + { + channel->addMessage(msg); + } } }