View Single Post
Plugin Info:     Modification:          Category:          Approver:   Exolent[jNr] (178)
TeoNoman
Senior Member
Join Date: Jun 2008
Old 02-22-2009 , 09:35   Spam Blocker v3.6
Reply With Quote #1

Spam Blocker v3.6

Description:
Monitoring my servers I noticed that a lot of players post ads in chat like "Want buy server? Call .... or visit cant_remember_site_address.co.il". Maybe this is some kind of adware, or maybe it's just an advertising campaign, I don't care. At first I banned them manually. Then I've got enough of that shi-- and wrote this plugin.

So. This plugin can hide ads message and warn/kick/ban (either usual way or amxbans way) the spammer. This plugin detects AMXBans or Advanced Bans (if it's loaded) and uses it's ban method. Also you can set a whitelist (only for ban.ini and kick.ini).

The plugin has three powerful features:
— Just hide messages (I use this feature for hiding messages like changerace, /rank etc.)
— Kick spammers
— Warn spammers
— Ban spammers (there are separate files for messages that cause in kick, ban or hide)

Also the plugin supports immunity flags — by default q (ADMIN_LEVEL_E).

CVAR list:
  • spam_blocker_active [0, 1, default 1] — enables or disables the plugin.
  • spam_bantime [1440 by default (one day)] — I spose everyone understood what does this cvar mean.
  • spam_check_nick [0, 1, default 1] — enables or disables nick-spam checking.
  • spam_detect_ip [0 by default] — if this set to 1 the plugin will perform needed action with any player which post any IPs to chat (but I'm still not sure that this feature is needed indeed).
  • spam_ip_mode [1, 2, 3, default 3] — what plugin is supposed to do when he found IP (of course, if IP detection is on). 1 — hide ad message. 2 — hide message and kick spamer. 3 — hide message and ban spamer.
  • spam_log_hides [0, 1, default 0] — log messages hides (only strings from file hide.ini). I made this feature because I set up a huge list of War3FT chat messages that I don't want to be shown in chat, so logging each hide of message like "tome" is some kinda strange
  • spam_warning [0, 1, default 1] — enables or disables the regular warning.
  • spam_notify_admins [0, 1, 2, default 2] — if 2 it will notify admins about all warnings, kicks and bans thru admin chat. If 1 it will notify admins about only warning (for example if somebody tries to spam anyway admin can ban him manually). If 0 no reports are sent.
  • spam_ban_mode [1, 2, default 1] — if your server is non-steam set 2 (thus plugin will ban/kick thru IP), if you got a steam-server set 1 (and the plugin will ban/kick thru SteamID).

Manual installation:
— Upload spam_blocker.amxx to your plugins directory.
— Add this plugin to the end of your plugins.ini.
— Create a folder "spam_blocker" in configs directory.
— Create files hide.ini, kick.ini, ban.ini, warn.ini, whitelist.ini and config.cfg.
— Set up a list of string in .ini files (examples: 1, 2).
— Set cvars in config.cfg.
— ???
— PROFIT!

Fast installation:
— Download & unzip attached archive to your mod folder (e. g. cstrike)
— Download attached spam_blocker.amxx and put it to your plugins folder.
— Edit hide.ini, kick.ini, ban.ini, warn.ini, whitelist.ini and config.cfg if needed.
— Add spam_blocker.amxx to the end of your plugins.ini file.
— Have fun!

Changelog:
Quote:
  • v1.0 — second stable release (I lost source code of the first release)
  • v1.1 — performance improved
  • v1.1.1 — even more optimized! Also removed debug messages
  • v1.2 — added spam_blocker.ini file
  • v1.2.1 — minor fix of major bug
  • v2.0 — almost all code has been totally rewritten, so productivity is to be very nice now.
  • v2.1 — added AMXBans autodetection
  • v2.2 — any IP detection
  • v2.3 — major optimization
  • v2.3.1 — a little regex-pattern optimization
  • v2.3.2 — minor changes
  • v2.3.3 — one more bug fix
  • v2.4 — plugin logs all hides/bans/kicks to AMX log
  • v3.0 — brand new version, a huge line of changes and fixes
  • v3.1 — added nick-checking and regular warning about spamming
  • v3.2 — major fixes, regular warning cvar
  • v3.3 — whitelist, a lot of fixes, new cvar spam_warning_message
  • v3.3.1 — renamed Spam Blocker folder to spam_blocker. When update the plugin from 3.3, don't forget to rename the folder!
  • v3.4 — added warn.ini; removed cvar spam_warning_message; when somebody gets kicked/banned/warned all online admins recieve report about that; new cvar spam_notify_admin; new cvar spam_ban_mode
  • v3.5 — lots of bugs fixed; plugin now supports Advanced Bans
  • v3.5.1 — a little fix
  • v3.5.2 — one more little fix
  • v3.6 — immunity flag
P. S. As you can see here (http://gg.zombified.ru/bans/ban_list.php) my plugin really works! If there are no active bans, you can try to search among expired bans by AUTOBAN reason.

P. P. S. As for me, I use this plugin in three ways:
1. Ban spamers (with ban.ini)
2. Kick abusers (with kick.ini)
3. Hide messages like "/rank" (with hide.ini)

P. P. P. S. Also I saw TF, HL and CZ severs, running this plugin. Please try this plugin at different mods and tell me!
Attached Files
File Type: zip spam_blocker_v3.6.zip (4.6 KB, 14415 views)
File Type: sma Get Plugin or Get Source (spam_blocker.sma - 15464 views - 6.7 KB)

Last edited by TeoNoman; 05-05-2009 at 00:53.
TeoNoman is offline