devStyle
Новичок
Здравствуйте.
Появилась нужда добавить защиту от подключения ботов с одного IP, сделал что-то такое:
После запуска сервер начал банить всех, кто заходит, а в логе следующее:
В чём тут проблема? Спасибо за помощь.
Появилась нужда добавить защиту от подключения ботов с одного IP, сделал что-то такое:
Код:
new ip[2][16];
GetPlayerIp(playerid, ip[0], 16);
foreach(i)
{
if(i == playerid) continue;
GetPlayerIp(i, ip[1], 16);
if(!strcmp(ip[0], ip[1], true))
{
printf(" %s and %s", ip[0], ip[1]);
new str[180], name1[24], name2[24];
GetPlayerName(playerid, name1, sizeof(name1));
GetPlayerName(i, name2, sizeof(name2));
...
Инфа админам о ботах
...
BanEx(playerid, ">1x CONNECT WITH ONE IP");
}
}
Код:
[05:16:00] [connection] 92.124.49.72:51688 requests connection cookie.
[05:16:01] [connection] incoming connection: 92.124.49.72:51688 id: 1
[05:16:01] [join] Nikitosik_Volcov has joined the server (1:92.124.49.72)
[05:16:06] Игрок Nikitosik_Volcov[1] зарегистрировался!
[05:17:25] [connection] 92.124.49.72:59493 requests connection cookie.
[05:17:26] [connection] incoming connection: 92.124.49.72:59493 id: 2
[05:17:26] [join] Dilan_Brain has joined the server (2:92.124.49.72)
[05:17:26] 92.124.49.72 and 92.124.49.72
[05:17:26] [A] GUARD | Nikitosik_Volcov[1] забанен за подключение ботов (Dilan_Brain[2])
[05:17:26] [A] GUARD | IP: 92.124.49.72
[05:17:26] [part] Dilan_Brain has left the server (2:2)
[05:17:36] [part] Nikitosik_Volcov has left the server (1:0)
