fix some dumb issues

This commit is contained in:
Chris Forbes
2010-08-24 17:00:54 +12:00
parent 3428b3c4c2
commit f6ec2163de

View File

@@ -378,6 +378,11 @@ namespace OpenRA.Server
int slot;
if (!int.TryParse(s, out slot)) { Log.Write("server", "Invalid slot: {0}", s ); return false; }
var slotData = lobbyInfo.Slots.FirstOrDefault( x => x.Index == slot );
if (slotData == null || slotData.Closed || slotData.Bot != null
|| lobbyInfo.Clients.Any( c => c.Slot == slot ))
return false;
GetClient(conn).Slot = slot;
SyncLobbyInfo();
return true;