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
- 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
- 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
- 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
- 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


Wyświetl pełny artykuł