private IEnumerator KickTimer(ConnectedPlayer player) { if (IsConnWhitelisted(player) || !Managers.instance.isForRelease) { // Debug.Log( "Ignoring kick timer for invalid connection" ); yield break; } int tries = 5; while (!player.IsAuthenticated) { if (tries-- < 0) { CustomNetworkManager.Kick(player, "Auth timed out"); yield break; } yield return(YieldHelper.Second); } }
private IEnumerator KickTimer(ConnectedPlayer player) { if (IsConnWhitelisted(player) || !BuildPreferences.isForRelease) { // Logger.Log( "Ignoring kick timer for invalid connection" ); yield break; } int tries = 10; // 10 second wait, just incase of slow loading on lower end machines while (!player.IsAuthenticated) { if (tries-- < 0) { CustomNetworkManager.Kick(player, "Auth timed out"); yield break; } yield return(WaitFor.Seconds(1)); } }
public override IEnumerator Process() { // Debug.Log("Processed " + ToString()); yield return(WaitFor(SentBy)); // if ( !Managers.instance.isForRelease ) // { // Debug.Log($"Ignoring {this}, not for release"); // yield break; // } var connectedPlayer = PlayerList.Instance.Get(NetworkObject); if (PlayerList.IsConnWhitelisted(connectedPlayer)) { Debug.Log($"Player whitelisted: {connectedPlayer}"); yield break; } if (connectedPlayer.SteamId != 0) { Debug.Log($"Player already authenticated: {connectedPlayer}"); yield break; } // Debug.Log("Server Starting Auth for User:"******"Start Session returned false, kicking"); CustomNetworkManager.Kick(connectedPlayer, "Steam auth failed"); } else { connectedPlayer.SteamId = SteamID; } } }