28.09.2010, 10:08
Hi all,someone know a good filterscript that i can range ban someone?
stock RangeBan(playerid)
{
if(!IsPlayerConnected(playerid)) return 0;
new total[16],ip[16], string[24];
GetPlayerIp(playerid, ip, sizeof(ip));
new cnt;
for(new i=0;i<strlen(ip);i++)
{
if(ip[i] == '.') cnt++;
if(cnt == 2)
{
i++;
strdel(ip, i, strlen(ip));
format(total,sizeof(total),"%s*.*",ip);
}
}
format(string, sizeof(string),"banip %s",total);
SendRconCommand(string);
return 1;
}
I believe a range ban Is a ban of the IP i think ***.***.**.11 (The * Is The Range Of The IP) Which does not change for dynamic IP's which is almost impossible to evade(ban evaders),Meaning a new Internet Provider can only allow them to re-connect to your server xD
|
I'm sorry, but you got it all backwards.
Would you do that, then you would ban almost everybody. A rangeban looks like this: "127.0.*.*" or "127.0.0.*" Would we do it your way, then we would ban EVERYONE who's IP ends with 11, except the ban evader. As the final (2) part(s) are the ones that change. |