reactiflux / discord-irc

Connects Discord and IRC channels by sending messages back and forth.
MIT License
1.2k stars 293 forks source link

Feature Request: Block predefined spam messages #430

Open Kage opened 5 years ago

Kage commented 5 years ago

Problem

Our IRC network uses the UnrealIRCd spamfilter feature to block various defined spam messages. Currently users in Discord can send these blocked messages which either disrupts the bot (gets gzlined) or spams them (if something like an oper override is applied to the bot).

Request

As an IRC administrator I want to prevent some predefined messages being forwarded from Discord So that my bot does not conflict with my spamfilter settings

Optimally, I would like to set an array of regular expressions in my config.json that, if matched, do some defined action (much like the IRC spamfilter). For now it's sufficient for me if that action is simply not sending the message to IRC. But other options could include Discord punishments (muting, banning, etc.). Bi-directionality (IRC users sending messages unwelcome in Discord, kicking or banning in IRC, etc.) could be useful, too.

Throne3d commented 4 years ago

There's a PR (#455) to implement this, but it doesn't go as general as regular expressions. As with some of the other block/ignore PRs & issues (see also #324), I'm not sure what would be a good compromise between complexity and flexibility here, especially keeping in mind not breaking backwards compatibility. It would be great to get some more input before merging to figure out a good, general solution.