←  [RSS] Pluginy

AMXX.pl: Support AMX Mod X i SourceMod

»

Block Advertising

Adminek AMXX.PL - zdjęcie Adminek AMXX.PL 01.10.2012

Block Advertising[REQ]

Description
  • As title suggests this is a plugin for blocking most of the adverts typed in chat. First i want to say that i know there is a similar plugin by JGHG (maybe others? but i don't remember) but this has a different approach. First, it doesn't use RegEx, i know it's powerful and flexible but not as much as this type of plugin needs because of the much cases where it can have false detects. It's based on string manipulation and can be customized in different ways. This plugin aims to block most of the adverts that can be written in chat under different forms (normal, with delimiters, white spaces, symbols, letters and so...) plus it's still in development. Before start to talk and write that something like this already exists or it can be done in a easiest way using RegEx or any other methods you know, try it! Then you may suggest improvements and post possible bugs or false detects. Thank you
Detect Code: 11.1.1.111.1.1.1:2071511...1...1...1 (or any number of dots)11/1/1/111 / 1 / 1 / 1 (any number of spaces and delimiters)1/1.2.3/1.2/3 (any combination of delimiters)11 1 1 111 1 1 122 l 2 l 2 l 2 (l - from leather. It can recognize letters delimiters too)Remember, it's working for any ip format but if IP it's written without any delimiters like 123.22.4.1, an IP block (3 different blocks) must contain at least 2 digits. If IP it's written with delimiters like 1-2-3/3-1/1/2 then it must contain 3 different digits. Cvar
  • amx_advblock (Default: "abd") - Plugin mod flagsFlags Code: a - Block chat lines that have been detected as advertb - Warn player that he made an advertc - Kick player if he make more than MAX_WARNINGS adverts (per session)d - Log chat lines that have been detected as advert ( Name and Chat line )e - Bypass advertise check for admins with BYPASS_FLAG
Changelog
  • v1.0- Initial release
  • v1.1- Fixed false detect if you write mutiple numbers / ip blocks in one sentence- Fixed number spam detection as an advertise ( 2 2 2 2 2 2 , 111 111 111 111, and so...)
  • v1.2- Now an IP can have 2 same blocks / digits (that means 3 different blocks / digits), lowering the chance to miss some IPs (222 123 123 5) (~2%?)
  • v1.3- Implemented punish system ( block advertise / warn / kick - after 'x' amount of warnings)- Added websites advertise check (supports almost all formats? http://x.com | www.x.com | x.com | x.00host.com | x.go.im/whatever/... ) more domains can be added- Added log for possible adverts. Can be used for future developments and bug-fixes- Moved all configs to a separate file (websites domains / whitelist )- Added the possibility to whitelist websites (server websites? or sponsors websites?)- Added the possibility to bypass advertise check if you are admin with specified FLAG- Integrated ColorChat- Optimized code
RequirmentsModifications
  • ColorChat Use - If you don't want to use colors in chat comment the following lines then recompile Code: //#include //#define USE_COLORCHAT
  • Maximum warnings before kick if you use cvar flag "c" Code: #define MAX_WARNINGS 3
  • Bypass advertise check on admins with the following flag Code: #define BYPASS_FLAG ADMIN_RCON
Files
  • advblock_config.ini - Configuration file must be copied into /addons/amxmodx/configs folder
  • advblock_logs.log - Logs file will be created automatically in /addons/amxmodx/logs folder
Attached Files Dołączona grafika Get Plugin or Get Source (block_advertising.sma - 6.5 KB) Dołączona grafika advblock_config.ini (327 Bytes)

Wyświetl pełny artykuł
Odpowiedz