Description: A plugin which attempts to block individuals who spam radio commands. The plugin itself doesn't necessarily regulate the rate at which commands can be issued but instead blocks users based on the average distance in time between a couple of earlier radio commands (meaning it allows a short burst). It will also check whether there's been at least some variation in time between previous radio commands. Players who are blocked will remain blocked until re-spawn and this typically occurs after a round restart or a player death on a deathmatch server. Additionally, it'll issue a map long block for users who trip the detection frequently.
Features:
Blocks people who intentionally/unintentionally spam radio commands.
Blocks automated radio command spamming scripts/hacks and/or timed radio command spamming attempts.
Users are typically blocked until re-spawn or until map change when max blocks is exceeded.
Users aren't able to circumvent map-long blocks by reconnecting (assuming max blocks is greater than 0).
User blocks are logged along with some basic diagnostic information (when sm_radio_log_blocks is set to 1).
Code:
ConVars:
sm_radio_max_avg_duration
default: 3
The maximum average duration between radio messages that will still trigger a block.
sm_radio_max_blocks
default: 3
The maximum times a user can be blocked before being permanently blocked until map change. (0 = Never issue this sort of block)
sm_radio_log_blocks
default: 1
Log users blocked for spamming radio.
Code:
Changelog
1.2 (Current)
- The plugin now offers a single warning to people who spam radio commands faster than once a second (on first pass only, though).
- The plugin now informs people that their radio command privileges were stripped for spamming.
- Some cleanup.
1.1
- Improved the usefulness of the map-long trie by making it track the times blocked.
- Some optimizations.
1.0
- Initial release.
Note:
This may or may not be useful for people and there might be a better plugin out there which basically achieve the same effect, but oh well. I'm new to SourceMod/SourcePawn and I primarily coded the plugin so that I could figure out the scripting language. That being said, don't hate on my sloppy, often times nonsensical crappy code too much.