diff --git a/Barotrauma/BarotraumaServer/ServerSource/Networking/Primitives/Peers/Server/ServerPeer.cs b/Barotrauma/BarotraumaServer/ServerSource/Networking/Primitives/Peers/Server/ServerPeer.cs index ebe1a4ac5..e249c0e8a 100644 --- a/Barotrauma/BarotraumaServer/ServerSource/Networking/Primitives/Peers/Server/ServerPeer.cs +++ b/Barotrauma/BarotraumaServer/ServerSource/Networking/Primitives/Peers/Server/ServerPeer.cs @@ -211,12 +211,6 @@ namespace Barotrauma.Networking if (result.Bool()) goto ignore; - if (IsPendingClientBanned(pendingClient, out string banReason)) - { - RemovePendingClient(pendingClient, DisconnectReason.Banned, banReason); - return; - } - if (connectedClients.Count >= serverSettings.MaxPlayers) { RemovePendingClient(pendingClient, DisconnectReason.ServerFull, ""); @@ -224,6 +218,12 @@ namespace Barotrauma.Networking ignore: + if (IsPendingClientBanned(pendingClient, out string banReason)) + { + RemovePendingClient(pendingClient, DisconnectReason.Banned, banReason); + return; + } + if (pendingClient.InitializationStep == ConnectionInitialization.Success) { NetworkConnection newConnection = pendingClient.Connection;