Raised This Month: $51 Target: $400
 12% 

Block Advertising


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Plugin Info:     Modification:   ALL        Category:   General Purpose       
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 10-01-2012 , 12:06   Block Advertising
Reply With Quote #1

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.1
11.1.1.1:20715
11...1...1...1 (or any number of dots)
11/1/1/1
11 / 1 / 1 / 1 (any number of spaces and delimiters)
1/1.2.3/1.2/3 (any combination of delimiters)
11 1 1 1
1 2 3       1 1      3 1     2
22 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 flags

    Flags
    Code:
    a - Block chat lines that have been detected as advert
    b - Warn player that he made an advert
    c - 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
Spoiler


Requirments
Modifications
  • ColorChat Use - If you want to use colors in chat, uncomment the following lines then recompile
    Code:
    #include <colorchat>
    
    #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

Find updated plugin HERE
Attached Files
File Type: ini advblock_config.ini (327 Bytes, 4014 views)
File Type: sma Get Plugin or Get Source (block_advertising.sma - 5602 views - 6.5 KB)
__________________
Still...lovin' . Connor noob! Hello

Last edited by hornet; 03-06-2015 at 19:50.
Alka is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:39.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode