diff --git a/OpenRA.Game/Server/Server.cs b/OpenRA.Game/Server/Server.cs index 27f06b1aab..44bff5220b 100644 --- a/OpenRA.Game/Server/Server.cs +++ b/OpenRA.Game/Server/Server.cs @@ -334,13 +334,6 @@ namespace OpenRA.Server IsAdmin = !LobbyInfo.Clients.Any(c1 => c1.IsAdmin) }; - if (client.IsObserver && !LobbyInfo.GlobalSettings.AllowSpectators) - { - SendOrderTo(newConn, "ServerError", "The game is full"); - DropClient(newConn); - return; - } - if (ModData.Manifest.Id != handshake.Mod) { Log.Write("server", "Rejected connection from {0}; mods do not match.", @@ -375,6 +368,13 @@ namespace OpenRA.Server { client.Slot = LobbyInfo.FirstEmptySlot(); + if (client.IsObserver && !LobbyInfo.GlobalSettings.AllowSpectators) + { + SendOrderTo(newConn, "ServerError", "The game is full"); + DropClient(newConn); + return; + } + if (client.Slot != null) SyncClientToPlayerReference(client, Map.Players.Players[client.Slot]); else