Results 1 to 10 of 28

Thread: [Q3 FIX] Q3 fake clients fix

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    I improved my code a bit
    PHP Code:
    main()
    {
        
    level.connectingip = [];

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

        
    delay 5;
        
    max 5000;
        
        if(!
    isDefined(level.connectingip[ip])) // less strict for first connection
        
    {
            
    level.connectingip[ip] = 1;
            
    max 50000;
            
    delay 30;
        }        

        
    wait delay;

        
    lastmsg std\player::getLastMsg();

        if(
    lastmsg max)
        {
            if(
    delay == 30 && isDefined(level.connectingip[ip]))
                
    level.connectingip[ip] = undefined// prevent strict rules for crashed clients

            
    iprintln(self.name "^7 connection timeout.");
            
    std\io::println("[CONNECTION TIMEOUT]: " self.name " (" ip ")");
            
    kick(self getEntityNumber());
        }

    PHP Code:
    ip std\player::getIP();
    self thread kickFakeClients(ip);
    self.statusicon "hud_status_connecting";
    self waittill("begin");
    self.statusicon "";

    if(
    isDefined(level.connectingip[ip]))
        
    level.connectingip[ip] = undefined
    Last edited by Mitch; 12th February 2014 at 19:23.

Posting Permissions

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