[FIX] Anti-Downer

#1
en la funcion:

Code: Select all

BOOL CGame::bAccept(class XSocket * pXSock)
abajo de:

Code: Select all

 ZeroMemory(m_pClientList[i]->m_cIPaddress, sizeof(m_pClientList[i]->m_cIPaddress)); 
          m_pClientList[i]->m_pXSock->iGetPeerAddress(m_pClientList[i]->m_cIPaddress); 
agregar:

Code: Select all

        //Anti-Downer
        int iTotalip = 0;
       
          for (int x = 1; x < DEF_MAXCLIENTS; x++) 
          if(m_pClientList[x] != NULL) { 
          if(strcmp(m_pClientList[x]->m_cIPaddress, m_pClientList[i]->m_cIPaddress) == 0) iTotalip++; 
          } 
          if(iTotalip > 10) { 
               delete m_pClientList[i]; 
               m_pClientList[i] = NULL; 
               return FALSE; 
          } 
          if(strlen(m_pClientList[i]->m_cIPaddress) < 10) { 
               delete m_pClientList[i]; 
               m_pClientList[i] = NULL; 
               return FALSE; 
          }
Centuu.-

Sol Lucet Omnibus.-

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron