SA-MP Forums Archive
[FilterScript] Anti IP/PAGE - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Anti IP/PAGE (/showthread.php?tid=159520)



Anti IP/PAGE - niepowtarzalny - 13.07.2010

Hi, I would like to introduce you to my script on the Anti IP / PAGE

The script I did in 3 minutes and does not contain much code

Код:
#include <a_samp>


new str[128];


public OnPlayerText(playerid, text[])
{


if(anty(text) && !IsPlayerAdmin(playerid))
{
format(str,256,"*** Player %s has been banned from the Server. Reason: advertising IP / PAGE",PlayerName(playerid));
SendClientMessageToAll(0xFF0000FF, str);
Ban(playerid);
return 0;
}


return 1;
}

stock anty(string[])
{
if(strfind(string,"www.",true)!=-1 || strfind(string,"http://",true)!=-1 || strfind(string,".com",true)!=-1 || strfind(string,".net",true)!=-1 || strfind(string,"91.",true)!=-1 || strfind(string,"195.",true)!=-1 || strfind(string,".pl",true)!=-1|| strfind(string,".org",true)!=-1)
return true;
return false;
}


stock PlayerName(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
return name;
}



Re: Anti IP/PAGE - marine - 13.07.2010

I found one problem with this. this can be a good code, but if you are telling someone the server's web site. it bans you. so, you should find a way to add an exception so you can say certain sites without it banning.


Re: Anti IP/PAGE - wolfcock - 13.07.2010

why not mute him?....


Re: Anti IP/PAGE - Toni - 13.07.2010

btw don't post specific IP's, people have different ranges


Re: Anti IP/PAGE - RyDeR` - 13.07.2010

nvm.


Re: Anti IP/PAGE - Flavinho153 - 13.07.2010

Example : And it :

1 8 9 . 5 1 . 2 1 2 ! w w w . B l a b l a . C o m ! C O M E T O T H I S S E R V E R !

Have block ?


Re: Anti IP/PAGE - JohnnyIV - 05.06.2013

Ok that isn't the best but still it's ok but I think to kick the player would be better.


Re: Anti IP/PAGE - JohnnyIV - 05.06.2013

maybe : http://pastebin.com/xrqyGcy1# better? By: InfinityCOD


Re: Anti IP/PAGE - KingHual - 05.06.2013

Quote:

new str[128];

format(str,256,"*** Player %s has been banned from the Server. Reason: advertising IP / PAGE",PlayerName(playerid));

Why?

EDIT: I just noticed the guy above me bumped the thread so, yeah, nevermind.