AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] Advert Antiflood (https://forums.alliedmods.net/showthread.php?t=147824)

EHG 01-14-2011 14:44

[ANY] Advert Antiflood
 
1 Attachment(s)
Advert Antiflood


Description

Ever get annoyed by people spamming their trade advertisements in TF2 trade servers? The current antiflood in sourcemod would allow a player to spam an advert up to 3 times before he is throttled for flooding.
This will detect lines of chat that are identical and limit the time allowed between them. Thus people that bind an advert to a key will only be able to display it once per X time.
This should have a huge impact on cleaning up the chat and allowing everyone to see adverts easily without having to deal with the spam.

I wrote this plugin with TF2 trade servers in mind however it will work for any game.



NOTE

If you have another plugin that manipulates the chat you might have to combine this plugin with the other. For example the simple chat colors plugin could conflict with this.


CVARS

sm_advertflood_time "5.00" Amount of time in seconds allowed between advert chat messages.

sm_advertflood_minlen "5" Minimum length of text to be detected (this will prevent people being throttled for various small things that they actually type fast. For example repeating the answer to yes/no question or making two smiley faces..etc) :D :D

Changelog

1.4 - Fixed a bug where client timer did not become invalid after a player left the server.
1.3 - Added userid tracking in timer.
1.2 - Cleaned up code a bit. Made plugin ignore console chat.
1.1 - Added detection for past 3 lines.
1.0 - Initial release.

PabloP 01-14-2011 15:33

Re: [ANY] Advert Antiflood
 
looks like it works good thanks.

xomp 01-16-2011 13:23

Re: [ANY] Advert Antiflood
 
Thanks for this tough guy!

EHG 01-23-2011 19:05

Re: [ANY] Advert Antiflood
 
Added detection for past three lines. The reason for this is because I got a few people who got clever, made two separate binds with different text to get around the block since it only memorized a single line.

What is nice about this version is that it will still allow people to use multi line adverts but will not allow them to spam.

tigerox 01-23-2011 21:11

Re: [ANY] Advert Antiflood
 
Great work, useful plug-in.

One suggestion, could you make it ignore console say messages. It currently throws an error if you spam a message from the console.

Thank you.

EHG 01-24-2011 16:57

Re: [ANY] Advert Antiflood
 
Quote:

Originally Posted by tigerox (Post 1398016)
Great work, useful plug-in.

One suggestion, could you make it ignore console say messages. It currently throws an error if you spam a message from the console.

Thank you.

Done :)

irogue 02-03-2011 03:55

Re: [ANY] Advert Antiflood
 
Does it allow a whitelist so to speak for cmds used by players repeatedly like !buy or such used from a plugin?

EHG 02-13-2011 02:56

Re: [ANY] Advert Antiflood
 
Quote:

Originally Posted by irogue (Post 1405995)
Does it allow a whitelist so to speak for cmds used by players repeatedly like !buy or such used from a plugin?

Commands will not be affected since they are handled before this plugin modifies the chat.

KyleS 02-13-2011 07:09

Re: [ANY] Advert Antiflood
 
You should be using AddCommandListener instead of RegConsoleCmd.

PabloP 02-14-2011 16:52

Re: [ANY] Advert Antiflood
 
It did block my say commands, after the first time of course, like it's supposed to. I just modified it to allow the same thing twice in a row.


All times are GMT -4. The time now is 23:44.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.