[Ajuda] incoming connection
#10

Quote:
Originally Posted by Glederson_dom
Посмотреть сообщение
Tenta por isso no Gamemode
PHP код:
enum infbot
{
    
vezesconection,
    
timeconnection,
    
ipconnection[16]
}
new 
connectionInfo[infbot];
public 
OnIncomingConnection(playeridip_address[], port)
{
    if(!
strcmp(ip_addressGetIpServer(), true))return 1;
    if(!
strcmp(connectionInfo[ipconnection], ip_addresstrue) && connectionInfo[timeconnection] > gettime())
    {
        if(
connectionInfo[vezesconection] > 3)
        {
            foreach(
Playeri)
            {
                if(
pInfo[i][Logado] == true && pInfo[i][Admin] > moderador)
                {
                    
SendClientMessage(i0xFFFF00FF"Suspeita de Boot Attack detectada. Suspeito Name:({FFFFFF}%s, IP: %s{FFFF00})",PlayerName(playerid), ip_address);
                }
            }
            
printf("| INFO | Suspeta de attack DDos Boot (IP: %s)"PlayerName(playerid), ip_address);
            return 
BlockIpAddress(ip_address60000);
        }
        
connectionInfo[vezesconection]++;
        return 
1;
    }
    
format(connectionInfo[ipconnection], 16ip_address);
    
connectionInfo[vezesconection] = 0;
    
connectionInfo[timeconnection] = gettime()+2;
    return 
1;

Jб usei esse sistema aн mano й bom mбs no caso eu recebo ataques com ips falsos entгo sгo multiplos ips nгo repetem
Reply


Messages In This Thread
incoming connection - by nasser - 11.08.2016, 18:55
Respuesta: incoming connection - by SammyJ - 11.08.2016, 21:16
Re: incoming connection - by connork - 12.08.2016, 01:00
Re: incoming connection - by YtZ - 12.08.2016, 14:54
Re: incoming connection - by Skritwo - 12.08.2016, 14:59
Re: incoming connection - by GTADev - 13.08.2016, 14:00
Re: incoming connection - by XandyMello - 13.08.2016, 15:45
Re: incoming connection - by nasser - 13.08.2016, 16:30
Re: incoming connection - by GTADev - 13.08.2016, 17:10
Re: Respuesta: incoming connection - by nasser - 14.08.2016, 00:51

Forum Jump:


Users browsing this thread: 1 Guest(s)