AntiCommerce
43 Attachment(s)
AntiCommerce 1.2a
Description: Anti spam filter. It doesn`t allow put addresses websites or/and IPs servers in chat or/and nick (controlled by cvars). This plugin, based on regular expression, is weapon against spammers. Included admins immunity support. Cvars:
Mean it will create log file (1) with found adverts or not (0).
Define which adverts it should search. Value from list:
Chose punishment for spammers
If 'ac_punish 2' it define how long player will be banned (in minutes)
If = 0 plugin doesn`t kick and ban for advert in nick
If = 1 and ac_punishbyname 1 changes found nick on 'Player' (defined as const)
If = 0 plugin doesn`t kick and ban for advert in chat messages
Work when ac_punish 2.
If =1 and found first player`s advert plugin set for him ac_punish 0 - only warning to know that this is doesn`t allowed on server. For next adverts use actual cvar value.
Define list of chars, which can be between bytes of IP to punish. In standard IP it is simple dot (.), but you can punish for other , fe. "12. 12, 12.12". Default value mean: "all not alphanumeric chars". It is single value - don`t add other chars (bad used could make pattern invalid, so it is blocked) to this, create own list of chars. Instead double quote char (") use [q] alias.
Max count of chars from list 'ac_ips_chars' in string. Value 3 mean, that 12...12.12.12 will be punished but 12....12.12.12 will not. Use 0 when want catch all more than 1.Cmds
Add <text> to list of exceptions. For this addresses it won`t punish (allowed addresess).
Show in console list of exceptions (only for admins). Modules: <regex> <sockets> Files: .amxx to plugins/ directory .txt to data/lang/ directory ML: [en] [pl] [de] - by Mordekay [es] - byjowy77 [ru] - by xPaw [bp] - by tmen_13 [hu] - by KuyteKuyte [lt] - by hlev (replaced this by shadowski) [ro] - by htudor [bg] - by ivkos [nl] - by crazyeffect [fr] - by arkshine [ua] - Strikerr [sk] - Seehank History: 1.2a Added: admin can modificate IP pattern Fixed: punish delayed for block player`s message 1.2 Fixed: new IP pattern which was put in comment to preg_match() PHP function by Jonathan Camenisch. (I rewrite to flexible version.) It is much better than mine included to v1.1 1.1e Added: cvar ac_flex_pattern define using standard or flexible pattern of IP 1.1d Fixed: better than in 1.1c - fixed multi-catch on connect Added: cvar 'ac_firstadvert' to warning before kick/ban Fixed: exception registering 1.1c Added: if ac_punish 0 in first round nick is not checking (thx Mordekay). 1.1b Added: log suspected matches (not punished, but formated like website address) More clean code; also added some comments 1.1a Some optimalizations Fixed: logging with user IP if ac_banip 1 Added: if player kicked or banned plugin show in console reason quote (shadowski`s suggestion) 1.1 Added: using sockets module to check URLs Added: cvar ac_what2search Added: amxbans support Changed: port of server is not necessary to get punishment(suggested by lpf_kb) Default MAX_EXC increased to 15 1.0 base Other: If ac_log 1 you should create advert folder in logs/ directory. I put mkdir function, but tested only on local computer, where chmod is not important. Scherzo a.k.a. R3X Thx Allucard for suggestion. Thx sapir5522 for idea of cvar 'ac_banip', help in debug and more :) |
Re: AntiCommerce
First! :)
Cool idea. I know that there are allready some plugins like that, but they eigther do only block ip's or url's. This is the first plugin i see that blocks them all. I'm going to test it soon :) Code:
[de] Edit: suggestion: could you add support for amxbans? |
Re: AntiCommerce
Is it what you meant 'support for amxbans'?
Replace Code:
server_cmd("banid %d #%d kick",bantime,uid); Code:
if(is_plugin_loaded("amx_bans.amxx")) Now I know it`s not working, so don`t copy this. |
Re: AntiCommerce
Quote:
|
Re: AntiCommerce
Thx for the code.
Reading the langfile and your description confuses me a bit. There is a counter for number of posted advertising, but your description do not say anything about it? How does it work if it is there? How to set number of maximum adverts? Edit: please don't use "Space" when posting code, use [Tab] instead, it causes a warning when compiling (warning 217: loose indentation) |
Re: AntiCommerce
u can add a cvar like "ac_punishbyname 0|1" but with say and say_team... for example if u only want to warning/kick/ban a player only for the nick, u cant in this moment...
good plugin |
Re: AntiCommerce
Counter is for filling array with exceptions. Exception in my plugin mean you won`t be punish for advertise it. For example you have website for the server, so you want ban or kick players, who write to someone, where is more info about server? No. Only add to your config file (maybe server.cfg) line
Code:
register_exception "www.myserverwebsite.com" In .sma file already exist code, which I post. It was only to be sure this part of plugin. Edit: @Alucard Yeah, good point. It could be more comfortable. Thx Added cvar 'ac_punishbysay'. |
Re: AntiCommerce
You should add an exception for admins in case they want to advertise their clan's website or other servers.
|
Re: AntiCommerce
no problem scherzo, other suggest.. maybe a cvar like register_exception but for ips :P
|
Re: AntiCommerce
Exolent[jNr], I included admin immunity support for say and say_team, but forgot only about nicks.
register_exception works for IPs too :) Edit: Added: admin immunity work with nicks. Added: cvar ac_changename Changed: default values of cvars Fixed: few small problems |
All times are GMT -4. The time now is 19:56. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.