SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 31/03/2016, 07:17 PM   #1
SickAttack
Godfather
 
Join Date: Dec 2013
Posts: 5,106
Reputation: 754
Default Anti Advertisement System - Simple, yet effective! [PAWN VERSION]

Anti Advertisement System
Simple, yet effective! [PAWN VERSION]

Information

This include contains a function which can be used to detect IP Addresses in strings.

Results

000.000.000.000:7777 - 1.
0.0.0.0:7777 - 1.
255.255.255.255:7777 - 1.
PLS COME JOIN SERVER 37____187____22____119 - 1.
PLS COME JOIN SERVER 37 $$$$ 187 $$$$ 22 $$$$ 119 - 1.
0000.000.000.0000:7777 - 0.
255.256.255.255:7777 - 0.
-1.-1.-1.-1:7777 - 1.
-32.-187.-22.-119 - NOTE: REMOVE THE -s AND JOIN NOW! - 1.

0 = An IP address wasn't found - 1 = An IP address was found

I'm happy with the results. But you may be wondering, why are the last 2 IPs detected as valid IPs? Well, it's for more security in my opinion. If a player sends a message like "-32.-187.-22.-119 - NOTE: REMOVE THE -s AND JOIN NOW!" it will go through and logically the player would win the battle and bring all your players onto their server.

Possible Usage
pawn Code:
public OnPlayerText(playerid, text[])
{
    if(IsAdvertisement(text))
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}[ERROR]: {FFFFFF}Your message contains an IP Address (strict detection).");
        return 0;
    }
    return 1;
}
Download

GitHub

Versions

Anti Advertisement System - Simple, yet effective! [REGEX VERSION]

Note

I will organize my GitHub page and fix all my threads here soon. But the code of this release is there in the meanwhile.

And yes, commas are detected as well. Same goes for any other character.
SickAttack is offline   Reply With Quote
Old 17/10/2017, 04:23 AM   #2
Chesher
Big Clucker
 
Join Date: Sep 2016
Location: I dunno
Posts: 60
Reputation: 1
Default Re: Anti Advertisement System - Simple, yet effective! [PAWN VERSION]

PAGE NOT FOUND.
__________________
Elites-Host.com Head Administrator
Chesher is offline   Reply With Quote
Old 17/10/2017, 02:18 PM   #3
RoyalEmpire
Big Clucker
 
Join Date: Oct 2017
Location: Hacking Place
Posts: 49
Reputation: 2
Default Re: Anti Advertisement System - Simple, yet effective! [PAWN VERSION]

Quote:
Originally Posted by Chesher View Post
PAGE NOT FOUND.
same
__________________
Releases :
Code:
[FILTERSCRIPT]Simple Automatic Messages System
[FILTERSCRIPT]DJ System
need of server
100 slots for free just pm me here
RoyalEmpire is offline   Reply With Quote
Old 02/11/2017, 06:27 PM   #4
Astralis
Guest
 
Posts: n/a
Default Re: Anti Advertisement System - Simple, yet effective! [PAWN VERSION]

Quote:
Originally Posted by RoyalEmpire View Post
same
Simply use this one http://forum.sa-mp.com/showthread.php?t=604086 which might be okay for your needs.
  Reply With Quote
Old 03/11/2017, 01:37 AM   #5
Gammix
High-roller
 
Gammix's Avatar
 
Join Date: Jan 2015
Location: Canada
Posts: 1,815
Reputation: 831
Default Re: Anti Advertisement System - Simple, yet effective! [PAWN VERSION]

Use Regular Expression plugin which lot faster and reliable.
__________________

My GitHub:

Gammix is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] Anti Advertisement System - Simple, yet effective! SickAttack Filterscripts 49 07/09/2016 09:07 PM
[FilterScript] WazzUp's Admin System. WazAdmin (VIP system, Anti Jetpack) .::New version::. xganyx Filterscripts 66 02/01/2015 06:55 AM
[FilterScript] Advanced Animation System[Simple and Effective] iLuXing Filterscripts 5 12/11/2014 05:15 AM
[Tutorial] Simple and effective Anti-Spam BlackWolf120 Tutorials 8 10/12/2013 02:11 PM
[Include] a_driveby - a simple, yet effective anti drive-by system Weponz Includes 4 26/09/2013 11:21 AM


All times are GMT. The time now is 01:29 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.