Fix multiple clients being assigned as admin.
This commit is contained in:
@@ -337,7 +337,6 @@ namespace OpenRA.Server
|
|||||||
SpawnPoint = 0,
|
SpawnPoint = 0,
|
||||||
Team = 0,
|
Team = 0,
|
||||||
State = Session.ClientState.Invalid,
|
State = Session.ClientState.Invalid,
|
||||||
IsAdmin = !LobbyInfo.Clients.Any(c1 => c1.IsAdmin)
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (ModData.Manifest.Id != handshake.Mod)
|
if (ModData.Manifest.Id != handshake.Mod)
|
||||||
@@ -373,6 +372,7 @@ namespace OpenRA.Server
|
|||||||
Action completeConnection = () =>
|
Action completeConnection = () =>
|
||||||
{
|
{
|
||||||
client.Slot = LobbyInfo.FirstEmptySlot();
|
client.Slot = LobbyInfo.FirstEmptySlot();
|
||||||
|
client.IsAdmin = !LobbyInfo.Clients.Any(c1 => c1.IsAdmin);
|
||||||
|
|
||||||
if (client.IsObserver && !LobbyInfo.GlobalSettings.AllowSpectators)
|
if (client.IsObserver && !LobbyInfo.GlobalSettings.AllowSpectators)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user