[FilterScript] Anti IP/PAGE
#1

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;
}
Reply
#2

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.
Reply
#3

why not mute him?....
Reply
#4

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

nvm.
Reply
#6

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 ?
Reply
#7

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

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)