// Get the player for the given client id Player GetPlayerByClientId(long aClientId) { for (int i = 0; i < players.Count; i++) { if (players[i].clientId == aClientId) { return(players[i]); } } // If we can't find the player for this client, who are they? kick them Debug.Log("Unable to get player for unknown client " + aClientId); serverNet.Kick(aClientId); return(null); }
////////////////////////// // RPCs from the admin client ////////////////////////// public void ClientKick(long aClientId) { serverNet.Kick(aClientId); }