FAForever / fa

Lua code for FAF
221 stars 228 forks source link

Implement Spam Detection and Cooldown for Multiplayer Taunts #6098

Closed magge-faf closed 2 months ago

magge-faf commented 2 months ago

Issue:

The lack of a cooldown on multiplayer taunts opens the door to disruptive spamming. This not only becomes annoying but forces players to disable taunts entirely, missing out on an intended fun element of the game.

Extend image: Example of in game spamming ![image](https://github.com/FAForever/fa/assets/101107758/2e65ccf5-f9dd-4a2e-b93c-6fb15dd73803)

Possible Solution

Introduce a spam detection, that kicks in with a cooldown, when a player is spamming multiplayer taunts. Bonus points, when it gets increased by 1, 2, 3, 5, 8, 13, 21, ... seconds. And the cooldown should reset after some time (maybe 1 minute?) to 1 seconds again.

A chat text should inform the player that he has still a cooldown of XY seconds, when he tries to spam.

With this feature, we can still use the taunts to immersive our selves with the game, without fearing that it gets spammed to death.

Garanas commented 2 months ago

@magge-faf #6099 adds a basic anti-spam protection where the message is shown but the sound is only played once every 10 seconds. The cooldown is applied to each player separately

magge-faf commented 2 months ago

Great job! Thanks for taking the time to make it happen.