Warzone / mars

All-in-one plugin for PGM servers
GNU Affero General Public License v3.0
9 stars 3 forks source link

Add chat filter #28

Open TheRealPear opened 1 month ago

TheRealPear commented 1 month ago

Since Mars pretty much handles punishment, it would make sense to add a chat filter. This chat filter could be customizable with Regex with the ability to automatically warn the user (by message) or punish them. It should also convert all-uppercase messages to lowercase, and prevent chat spamming, advertisement, and flooding by truncating repetitive messages. Ideally, it should be able to moderate signs, anvil, and books. Since Mars has DiscordSRV integration, it would be nice to see this apply to messages sent in the server-chat channel, which would save mods some time in deleting offensive messages.

In the past, Warzone used ChatFilter by a4papers, but we stopped using it after we migrated away from TGM. More recently, I tested ChatSentinel, which works great. However, neither plugin can read Mars chat. Rather than using third-party plugins, I figured it would be better to take this seriously and go all in on custom instead.

Owehttamy commented 1 month ago

Integration with DiscordSRV would be a major benefit, as we could create a server channel to log when the RegEx filter flags users for false positives, allowing staff to find flaws and fine-tune the system. It would be essential that we test the system and its filters for an extended period before enabling auto-punishments. Having a toggle for automated punishments per RegEx filter would also be useful for experimenting.