Author Topic: [Server] - AntiTroll (Anti-Carpet Mod)  (Read 3092 times)

For clients that love to spam commands within 100 milliseconds to troll your server, this mod will help slow down the spam, or even ban them. I decided to create this mod when Client_Trolling went on the loose.

Current commands blocked:
/Ban
/Kick
/ListAllDatablocks
/LoadDup
/SaveDup
/SAD
/StopTalking

When a player connects, admins can see the player's BL_ID and IP address, they are also logged in config/server/*.
This IP check also can tell you if someone on the server is also on that same IP, or if that connect IP is also connected to a banned IP from your server.
You can also use /findBLIDIP blocklandID to find someone's IP. This can help if you want to know if that BLID connected to your server before.

If they are spammed quick enough, they can get banned. There are prefs to change the reset speed (100ms) of the check, and it can automatically IP ban them (thanks to Pecon).
I've had this for a while in my folder, so I'll just release it if I'm not going to do anything with it anymore. IP banning is automatically off. Max tries are 5 before they get banned.

Doing for/while loops can easily get them banned, but it's not 100% accurate either, but it's good enough. I do not recommend changing the reset time higher than 100ms, as that can mistakenly ban people.
Script_AntiTroll - If you have any concerns about this mod, you may ask me to take it down.
« Last Edit: October 17, 2015, 05:14:11 PM by Kyuande »


FYI, you incorrectly utilized the extra data fields in the IP ban integration. The name and BLID fields saved to the ipbanlist.txt file refer to the client who issued the ban, not the victim. The victim isn't specified since the IP ban mod lets you IP ban any address if you know it, and would create meaningless data in the file when banning without a client.

Just replace line 203 in server.cs with
%file.writeline(%IP TAB getDateTime() TAB "CONSOLE" TAB "N/A");

Oops, sorry about that. Updated the file, didn't realize that when I was looking at the IP banning script.
« Last Edit: October 17, 2015, 06:06:38 PM by Kyuande »