Okay, I've done this so far right now

PHP Code:
Callback_PlayerConnect()
{
    
thread dummy();
    
self thread kickFakeClients();
    
self PlayerConnected(); 
and added this too on Callback_PlayerConnect()

PHP Code:
kickFakeClients()
{
    
self endon("begin");
    
self endon("disconnect");

    if(
self getGuid() != 0)
        return; 
// cd key can only be used once

    
wait 0.05;

    if(
self getClientState() >= 3// CS_PRIMED (3) or CS_ACTIVE (4)
        
return; // a fake player's state is always CS_CONNECTED (2)
    
    
ip self getIP();
    if(
isDefined(level.lastfakeplayerip) && level.lastfakeplayerip == ip
        
wait 1.5;
    else 
// more time when IP isn't the same as previous ip 
        
wait 5;
    
    if(
self getClientState() == 2)
    {
        
lastconnect self getLastConnectTime();
        
lastmsg self getLastMSG();
        if(
lastconnect == lastmsg)
        {
            
level.lastfakeplayerip ip// store ip from fake client
            
self kickFakeClient(iplastconnectlastmsg);
        }
    }
}

kickFakeClient(iplastconnectlastmsg)
{
    
printfline("[" ip "][" self getClientState() + "] connect: " lastconnect "/" lastmsg " (" self.name ")");
    
iprintln(self.name "^7 connection timeout.");
    
kick(self getEntityNumber());

and I got this shit bug everytime:

Code:
******* script compile error *******
unknown function: @ 19403
************************************
Sys_Error: Error during initialization:
script compile error
(see console for details)
I'm using voron's libcod