CivClassic / SimpleAdminHacks

Tools and backend for Citadel servers, including advanced inventory monitoring, active new player assistance, and other logging. Built for Paper 1.16.5
BSD 3-Clause "New" or "Revised" License
0 stars 19 forks source link

Fix AntiFastBreak spam #80

Closed Protonull closed 3 years ago

Protonull commented 3 years ago

This should fix https://github.com/CivClassic/SimpleAdminHacks/issues/42 by putting console warnings behind a similar rate limiter as the fast-break limiter. If the plugin is in debug mode, every attempt to punish the player will be logged, otherwise it's max-rate limited to once every 10 seconds.

wingzero54 commented 3 years ago

I just tested and was able to send 1800 logs in 2 seconds, which is still an issue. Those 2 seconds would take kira 6 minutes to relay in discord

wingzero54 commented 3 years ago

Wait sorry my mistake, this does effectively rate limit thank you! Is it possible to throw a counter on the end of the log, to indicate that it is a ton of logs condensed? Otherwise it seems we wouldn't be able to tell if they are rate limited because they sent a ton, or they really did only trigger once. For example, I generated 1800 logs in my last test, this test I only generated 4 logs. But sometimes a person will trigger a couple logs, which is usually a lag spike, not an actual fastbreak incident and we need to be able to tell the difference