[CS:S] Radio Command Spam Blocker

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 of radio commands). Players who are suspected of spamming radio commands will be blocked until re-spawn which 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.




Code:


ConVars:



sm_radio_min_avg_duration

default: 1

The minimum average duration between radio messages without triggering a block.



sm_radio_max_blocks

default: 1

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.


Note:

This may or may not be useful for people and there's likely better plugins out there which achieve the same effect, oh well. I coded the plugin so that I could figure out how to make plugins in SourceMod. I'm new to working in it so don't hate on me too much if the plugin primarily consists of sloppy almost crappy code. :oops:



PS: Can anyone tell me why line 151 causes a buffer overflow? I'm somewhat disappointed about that since line 151 looked much nicer than what I had to write to work around it. Not that it really matters though, it was only two lines, but still... :grrr:















Attached Files





File Type: sp


Get Plugin or
Get Source (sm_radiospamblocker.sp - 9.7 KB)








Orignal From: [CS:S] Radio Command Spam Blocker

No comments

Not a single link is allowed to submit in comment :o