Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- kickFakeClients()
- {
- self endon("begin");
- self endon("disconnect");
- /*if (!isDefined(self.isBot))
- {*/
- 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
- kick2(self getEntityNumber(), "EXE_CANNOTVALIDATEPURECLIENT");
- }
- }
- //}
- }
Advertisement
Add Comment
Please, Sign In to add comment