Merge pull request #12459 from pchote/fix-server-exploit
Reset server slots and reenable spectators when the last player quits.
This commit is contained in:
@@ -586,8 +586,10 @@ namespace OpenRA.Server
|
||||
|
||||
DispatchOrders(toDrop, frame, new byte[] { 0xbf });
|
||||
|
||||
// All clients have left: clean up
|
||||
if (!Conns.Any())
|
||||
TempBans.Clear();
|
||||
foreach (var t in serverTraits.WithInterface<INotifyServerEmpty>())
|
||||
t.ServerEmpty(this);
|
||||
|
||||
if (Conns.Any() || Dedicated)
|
||||
SyncLobbyClients();
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace OpenRA.Server
|
||||
public interface IInterpretCommand { bool InterpretCommand(Server server, Connection conn, Session.Client client, string cmd); }
|
||||
public interface INotifySyncLobbyInfo { void LobbyInfoSynced(Server server); }
|
||||
public interface INotifyServerStart { void ServerStarted(Server server); }
|
||||
public interface INotifyServerEmpty { void ServerEmpty(Server server); }
|
||||
public interface INotifyServerShutdown { void ServerShutdown(Server server); }
|
||||
public interface IStartGame { void GameStarted(Server server); }
|
||||
public interface IClientJoined { void ClientJoined(Server server, Connection conn); }
|
||||
|
||||
Reference in New Issue
Block a user