From 3bcbcac869a3e102a5e71673d19aaaea97e76c26 Mon Sep 17 00:00:00 2001 From: fourtf Date: Sat, 23 Jun 2018 23:08:15 +0200 Subject: [PATCH] commented out the NOTICE message handle --- src/providers/twitch/ircmessagehandler.cpp | 36 ++++++++++------------ 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/src/providers/twitch/ircmessagehandler.cpp b/src/providers/twitch/ircmessagehandler.cpp index 7afa1a642..4c005991c 100644 --- a/src/providers/twitch/ircmessagehandler.cpp +++ b/src/providers/twitch/ircmessagehandler.cpp @@ -298,30 +298,28 @@ void IrcMessageHandler::handleModeMessage(Communi::IrcMessage *message) void IrcMessageHandler::handleNoticeMessage(Communi::IrcNoticeMessage *message) { - return; - // auto app = getApp(); - // MessagePtr msg = Message::createSystemMessage(message->content()); + auto app = getApp(); + MessagePtr msg = Message::createSystemMessage(message->content()); - // QString channelName; - // if (!TrimChannelName(message->target(), channelName)) { - // // Notice wasn't targeted at a single channel, send to all twitch channels - // app->twitch.server->forEachChannelAndSpecialChannels([msg](const auto &c) { - // c->addMessage(msg); // - // }); + QString channelName; + if (!trimChannelName(message->target(), channelName)) { + // Notice wasn't targeted at a single channel, send to all twitch channels + app->twitch.server->forEachChannelAndSpecialChannels([msg](const auto &c) { + c->addMessage(msg); // + }); - // return; - // } + return; + } - // auto channel = app->twitch.server->getChannelOrEmpty(channelName); + auto channel = app->twitch.server->getChannelOrEmpty(channelName); - // if (channel->isEmpty()) { - // debug::Log("[IrcManager:handleNoticeMessage] Channel {} not found in channel - // manager", - // channelName); - // return; - // } + if (channel->isEmpty()) { + debug::Log("[IrcManager:handleNoticeMessage] Channel {} not found in channel manager ", + channelName); + return; + } - // channel->addMessage(msg); + channel->addMessage(msg); } void IrcMessageHandler::handleWriteConnectionNoticeMessage(Communi::IrcNoticeMessage *message)