Dynamic IP ban
#7

I had exactly same problem. I fixed it via this simple code, under OnPlayerConnect of course.


pawn Code:
if (!udb_Exists(PlayerName(playerid))) { //If there is no account created with player's name, happens the following:

  new ip[16];
  GetPlayerIp(playerid, ip, sizeof(ip));
if (strcmp(ip, "85.76", false, 5) == 0) //If IP Starts with 85.76 (5 characters) = kick
{
  SendClientMessage(playerid, COLOR_ORED, "Error: Your IP- Address has been range banned by the management. Try again later or contact the management");
  Kick(playerid);
}
if (strcmp(ip, "85.77", false, 5) == 0) //If IP Starts with 85.77 (5 characters) = kick
{
  SendClientMessage(playerid, COLOR_ORED, "Error: Your IP- Address has been range banned by the management. Try again later or contact the management");
  Kick(playerid);
}
  }
This is my own one. Simple & working


Quote:
Originally Posted by Hiddos
Probably not.

I'd say enter as RCON admin and type /rcon banip 109.61.*.*
Don't do this. You might ban someone from the same range. Try to create something like my one above.
Reply


Messages In This Thread
Dynamic IP ban - by sushihusi - 11.06.2010, 17:05
Re: Dynamic IP ban - by Flashy - 11.06.2010, 17:13
Re: Dynamic IP ban - by Hiddos - 11.06.2010, 17:20
Re: Dynamic IP ban - by sushihusi - 11.06.2010, 17:26
Re: Dynamic IP ban - by Hiddos - 11.06.2010, 17:32
Re: Dynamic IP ban - by sushihusi - 11.06.2010, 17:33
Re: Dynamic IP ban - by Jakku - 11.06.2010, 17:35
Re: Dynamic IP ban - by Hiddos - 11.06.2010, 17:36
Re: Dynamic IP ban - by sushihusi - 11.06.2010, 17:37
Re: Dynamic IP ban - by wolfcock - 10.07.2010, 17:40

Forum Jump:


Users browsing this thread: 2 Guest(s)