Better try with creating a trie where to save some valur for the player's IP (as a key). Do that on connect. And instead of looping all the players in the server and checking manually each one's IP, you can just check if the trie key exists and that'd be enough. You can use also some boolean to detect the actual player with the current IP and use it like an rxtra check on connect, just to be more sure. If you didn't get it at all, I can show some example when I get home.