Added deleted messages, will also add the disabled tag to denied automod messages

This commit is contained in:
apa420
2019-04-19 22:44:02 +02:00
parent 4cf656fe62
commit 4f79d6fc07
10 changed files with 78 additions and 1 deletions
@@ -267,6 +267,41 @@ void IrcMessageHandler::handleClearChatMessage(Communi::IrcMessage *message)
}
}
void IrcMessageHandler::handleClearMessageMessage(Communi::IrcMessage *message)
{
// check parameter count
if (message->parameters().length() < 1)
{
return;
}
QString chanName;
if (!trimChannelName(message->parameter(0), chanName))
{
return;
}
auto app = getApp();
// get channel
auto chan = app->twitch.server->getChannelOrEmpty(chanName);
if (chan->isEmpty())
{
log("[IrcMessageHandler:handleClearMessageMessage] Twitch channel {} "
"not "
"found",
chanName);
return;
}
auto tags = message->tags();
QString targetID = tags.value("target-msg-id").toString();
chan->deleteMessage(targetID);
}
void IrcMessageHandler::handleUserStateMessage(Communi::IrcMessage *message)
{
auto app = getApp();