Results 1 to 10 of 28

Thread: [Q3 FIX] Q3 fake clients fix

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #13
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    This is my latest version with the new libcod functions.

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

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

        
    lastconnect self getLastConnectTime();
        
    lastmsg self getLastMSG();
        
        if(
    lastmsg == lastconnect)
        {
            
    ip self getIP();
            
            if(
    isDefined(level.lastconnectedplayerip) && level.lastconnectedplayerip == ip)
                
    self kickFakeClient(iplastconnectlastmsg);
            else 
    // more time when IP isn't the same as previous ip
            
    {
                
    level.lastconnectedplayerip ip;
                
    wait 5;
                
                
    lastconnect self getLastConnectTime();
                
    lastmsg self getLastMSG();
                
                if(
    lastmsg == lastconnect)
                    
    self kickFakeClient(iplastconnectlastmsg);
            }
        }
    }

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

    PHP Code:
    self thread kickFakeClients();

    self.statusicon "hud_status_connecting";
    self waittill("begin");
    self.statusicon ""
    Last edited by Mitch; 14th August 2014 at 13:06.

  2. The Following 3 Users Say Thank You to Mitch For This Useful Post:

    kung foo man (14th August 2014),Ni3ls (15th August 2014),Rocky (15th August 2014)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •