Skocz do zawartości

  • Zaloguj korzystając z Facebooka Zaloguj korzystając z Twittera Zaloguj przez Steam Zaloguj poprzez Google      Logowanie »   
  • Rejestracja

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.

  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse


Block Advertising

  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
Brak odpowiedzi do tego tematu

#1 Adminek AMXX.PL

    Admin :)

  • Bot

Reputacja: 156

  • Postów:7115
  • Lokalizacja:AMXX.PL

Napisano 01.10.2012 17:06

Block Advertising[REQ]

  • 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: (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, 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
  • 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? | | | | ) 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
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ł

Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych