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

Retrospective ban by the message text factor #14

Open
ForNeVeR opened this issue May 18, 2019 · 1 comment
Open

Retrospective ban by the message text factor #14

ForNeVeR opened this issue May 18, 2019 · 1 comment

Comments

@ForNeVeR
Copy link
Contributor

ForNeVeR commented May 18, 2019

Consider this scenario (sadly, very typical these days):

  1. Spambot1 joins chat1
  2. Spambot2 joins chat2
  3. Spambot3 joins chat3
  4. All three bots send the same message text to the respective chats

Currently, I need to manually visit all the chats and invoke @dotnet_vahter_bot ban separately (because the bots are different users).

What I want is Grinder to automatically ban the Spambot2 and Spambot3 after I shown it the message text of Spambot1.

How to achieve that:

  1. Whenever Grinder starts, it should read last N (N should be configurable limit, with a sensible default of, say, 25) messages in each of the connected chats, and store these messages in memory.
  2. When a message arrives in any of the connected chats, Grinder should drop the earliest message saved and save a new one (FIFO order).
  3. When a ban request arrives as a reply on the spam message, Grinder should compare that spam message with the saved messages from each of the connected chats. If it finds any match, it should delete the matched message and ban the corresponding users in each of the chats the message was posted.
  4. The spam message should be saved to a separate global in-memory storage with another configurable limit of M (e.g. up to 10 messages, we don't need much here because of their variety).
  5. When a new message is registered in any of the connected chats, Grinder should compare it with the M globally stored spam messages, and ban the user/delete the message on match.
@ForNeVeR ForNeVeR self-assigned this Aug 21, 2019
@ForNeVeR
Copy link
Contributor Author

ForNeVeR commented Dec 27, 2019

Should work for the following types of content:

  • for text messages
  • for media messages (images)
  • for stickers

Should ignore too short text messages (e.g. messages smaler that some configurable limit, e.g. 25 characters) in case they contain no media/stickers to avoid mass ban for messages like "hello" or something like that.

@ForNeVeR ForNeVeR removed their assignment Oct 20, 2020
Keroosha added a commit to Keroosha/grinder that referenced this issue Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant