Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flood/spam control #361

Open
mrandersonsmith opened this issue Jan 17, 2020 · 4 comments
Open

flood/spam control #361

mrandersonsmith opened this issue Jan 17, 2020 · 4 comments
Labels
Enhancement Under Advisement This is being considered for how feasible it is or how it could be implemented

Comments

@mrandersonsmith
Copy link

Any way to limit chat spam/flooding?

@tduva
Copy link
Contributor

tduva commented Feb 1, 2020

I'm not quite sure what you mean. But Chatty is not a bot, so it's not well suited for automatic moderation, if that's what you're after.

@KaXaSA
Copy link

KaXaSA commented Feb 27, 2020

If you mean limit only for you, to make it more aesthetically pleasing, then yes you actually can, kinda. You have 2 options:

*Keep in mind that I'm not amazing with regex so other people could most likely give you a better solution.

A - Chatty's Filter + regex.
Filter is great because unlike Ignore, it doesn't remove the whole message. So you can basically shorten long messages that have the same emote/character/word/phrase spammed.

  1. Settings > Chat > Filter
  2. Add this:
    replacement:none reg:(.{8,})(?=\1)
  3. Save
  4. Make sure you check 'Enable Filter'

IMO 8 is a good number, I wouldn't go much lower (maybe 6 could be ok) but you can go higher if you want to allow more emotes/characters.

"replacement:none" is used to replace the matched regex with 'nothing' but you can remove it or change it to something like "replacement:REPLACED!" just to see if it's working properly and add the "replacement:none" back later. If you remove it you should see a '...' in the place of the removed string.

You can check what the regex does here:
https://regex101.com/r/wzao4z/2

But basically:

Chat Before

UserA: 😂😂😂😂😂😂😂😂😂😂😂😂😂😂😂😂😂😂
UserB: PepeLaugh He doesn't know PepeLaugh He doesn't know PepeLaugh He doesn't know PepeLaugh

Chat After

UserA: 😂😂😂😂😂
UserB: PepeLaugh He doesn't know


B - Chatty's Ignore + regex
This is great IF you want to remove the WHOLE user message.

Example: this ascii-art that looks awful unless the chatty windows match twitch's chat default width, so what if you don't want to see these messages at all?

  1. Settings > Chat > Filter
  2. Add this:
    reg:([⠄-⣿▀-▟]){6,}?
  3. Save
  4. Make sure you check 'Enable Ignore' (take a look at the other options too)

You can check what the regex does here:
https://regex101.com/r/pvXKu1/3
To keep it simple this will remove any message that matches some characters in these ranges: ⠄-⣿ OR ▀-▟ You don't really need to define a range you can also use like 1 or more character like ᅚ═⣿⠒⠄▔░█

You can see the removed messages (real-time) in:
View > Ignored


Ignore Example 01
Ignore is also great to remove USER messages that have a BOT command (usually !commandHere).
For Example, if the users are spamming these commands:

  • !drops
  • #duel
  • +register

You can add this to your Ignore filter:
reg:^[!+#]\w+

This will match/remove messages that have this format:
'!' OR '+' OR '#' that is at the beginning of the message and that is followed by any letter, word or number

Chat Before

UserA: PepeLaugh
UserB: !drops
UserA: !bet 1000
UserC: #register
UserA: I made this :)

Chat After

UserA: PepeLaugh
UserA: I made this :)

Ignore Example 02
You can also make it filter BOT messages except when they are directed to your username
For example, if you use the command !balance and the BOT reply with the following message:

@Your_Username - You have 10000 coins

You can add this to your Ignore filter:
reg:^@(?!Your_Username).+ - You have \d+ coins

This will match/remove messages that have this format:
'@' that is at the beginning of the message, followed by 'AnyUserNameThatIsNotYour_Username' followed by ' - You have AnyNumberHere coins'

Chat Before

BOT: @User_A - You have 10000 coins
BOT: @Your_Username - You have 10000 coins
BOT: @User_B - You have 10000 coins
BOT: @User_C - You have 10000 coins

Chat After

BOT: @Your_Username - You have 10000 coins

@mrandersonsmith
Copy link
Author

ahh thanks for reply those are pretty good, yeah i just meant a way to block mega copypasta chats. Basically every message would be put into an ignore for 5 seconds.

@tduva tduva added Enhancement Under Advisement This is being considered for how feasible it is or how it could be implemented labels May 4, 2020
@tduva
Copy link
Contributor

tduva commented May 4, 2020

I'm thinking some sort of Highlight/Ignore matching prefix that detects if the message is identical or similiar to one that was posted in a last few minutes might be useful, both for ignoring messages and for highlighting them for modding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Under Advisement This is being considered for how feasible it is or how it could be implemented
Projects
None yet
Development

No branches or pull requests

3 participants