Compare commits

..

2 commits

Author SHA1 Message Date
pajlada eb2c91c80d
Merge 6a2979bd4d into f3a5f81fa0 2024-11-06 00:09:45 +01:00
Rasmus Karlsson 6a2979bd4d
improve automod blocked term messaging 2024-11-06 00:09:16 +01:00
2 changed files with 16 additions and 18 deletions

View file

@ -237,10 +237,6 @@ void SeventvEventAPI::handleDispatch(const Dispatch &dispatch)
// unhandled (not clear what we'd do here yet)
}
break;
case SubscriptionType::CreateEmoteSet: {
// unhandled (c2 does not support custom emote sets)
}
break;
default: {
qCDebug(chatterinoSeventvEventAPI)
<< "Unknown subscription type:"

View file

@ -33,6 +33,7 @@
#include <pajlada/signals/signalholder.hpp>
#include <QCoreApplication>
#include <QMetaEnum>
#include <QStringBuilder>
#include <cassert>
#include <functional>
@ -148,8 +149,6 @@ bool shouldSendHelixChat()
namespace chatterino {
using namespace literals;
TwitchIrcServer::TwitchIrcServer()
: whispersChannel(new Channel("/whispers", Channel::Type::TwitchWhispers))
, mentionsChannel(new Channel("/mentions", Channel::Type::TwitchMentions))
@ -505,22 +504,25 @@ void TwitchIrcServer::initialize()
if (hideBlockedTerms)
{
action.reason =
u"matches %1 blocked term%2"_s
.arg(numBlockedTermsMatched)
.arg(numBlockedTermsMatched > 1
? u"s"
: u"");
u"matched " %
QString::number(
numBlockedTermsMatched) %
u" blocked term" %
(numBlockedTermsMatched > 1 ? u"s"
: u"");
}
else
{
action.reason =
u"matches %1 blocked term%2 \"%3\""_s
.arg(numBlockedTermsMatched)
.arg(numBlockedTermsMatched > 1
? u"s"
: u"")
.arg(msg.blockedTermsFound.join(
u"\", \""));
u"matched " %
QString::number(
numBlockedTermsMatched) %
u" blocked term" %
(numBlockedTermsMatched > 1 ? u"s"
: u"") %
u": \"" %
msg.blockedTermsFound.join(u"\", \"") %
u"\"";
}
}
else