Change in which "message received" handler IRC commands are handled after the change in CAP REQs.

Fixes #1252
This commit is contained in:
Rasmus Karlsson
2019-08-31 17:41:49 +02:00
parent 671c9ed654
commit 829c63be51
3 changed files with 38 additions and 85 deletions
@@ -582,49 +582,6 @@ void IrcMessageHandler::handleNoticeMessage(Communi::IrcNoticeMessage *message)
}
}
void IrcMessageHandler::handleWriteConnectionNoticeMessage(
Communi::IrcNoticeMessage *message)
{
static std::unordered_set<std::string> readConnectionOnlyIDs{
"host_on",
"host_off",
"host_target_went_offline",
"emote_only_on",
"emote_only_off",
"slow_on",
"slow_off",
"subs_on",
"subs_off",
"r9k_on",
"r9k_off",
// Display for user who times someone out. This implies you're a
// moderator, at which point you will be connected to PubSub and receive
// a better message from there
"timeout_success",
"ban_success",
// Channel suspended notices
"msg_channel_suspended",
};
QVariant v = message->tag("msg-id");
if (v.isValid())
{
std::string msgID = v.toString().toStdString();
if (readConnectionOnlyIDs.find(msgID) != readConnectionOnlyIDs.end())
{
return;
}
log("Showing notice message from write connection with message id '{}'",
msgID);
}
this->handleNoticeMessage(message);
}
void IrcMessageHandler::handleJoinMessage(Communi::IrcMessage *message)
{
auto app = getApp();