Raid Spam Prevention is now applied to joined chats.

This commit is contained in:
Tom
2024-08-07 23:21:56 +00:00
parent ca5b1c0733
commit cc81999abe
5 changed files with 73 additions and 41 deletions

View File

@@ -98,12 +98,6 @@ namespace TwitchChatTTS.Twitch.Socket.Handlers
return;
}
if (_user.AllowedChatters != null && !_user.AllowedChatters.Contains(chatterId))
{
_logger.Information("Potential chat message from raider ignored due to potential raid message spam.");
return;
}
if (message.Reply != null)
msg = msg.Substring(message.Reply.ParentUserLogin.Length + 2);
@@ -166,6 +160,12 @@ namespace TwitchChatTTS.Twitch.Socket.Handlers
}
}
if (_user.Raids.TryGetValue(message.BroadcasterUserId, out var raid) && !raid.Chatters.Contains(chatterId))
{
_logger.Information($"Potential chat message from raider ignored due to potential raid message spam [chatter: {message.ChatterUserLogin}][chatter id: {message.ChatterUserId}]");
return;
}
// Replace filtered words.
if (_user.RegexFilters != null)
{