The great event move
This commit is contained in:
+1
-10
@@ -187,16 +187,7 @@ namespace Barotrauma.Networking
|
||||
{
|
||||
if (netServer == null) { return; }
|
||||
|
||||
var skipDeny = false;
|
||||
{
|
||||
var result = GameMain.LuaCs.Hook.Call<bool?>("lidgren.handleConnection", inc);
|
||||
if (result != null) {
|
||||
if (result.Value) skipDeny = true;
|
||||
else return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!skipDeny && connectedClients.Count >= serverSettings.MaxPlayers)
|
||||
if (connectedClients.Count >= serverSettings.MaxPlayers)
|
||||
{
|
||||
inc.SenderConnection.Deny(PeerDisconnectPacket.WithReason(DisconnectReason.ServerFull).ToLidgrenStringRepresentation());
|
||||
return;
|
||||
|
||||
+1
-6
@@ -257,12 +257,7 @@ namespace Barotrauma.Networking
|
||||
|
||||
protected void UpdatePendingClient(PendingClient pendingClient)
|
||||
{
|
||||
var skipRemove = false;
|
||||
var result = GameMain.LuaCs.Hook.Call<bool?>("handlePendingClient", pendingClient);
|
||||
|
||||
if (result != null) skipRemove = result.Value;
|
||||
|
||||
if (!skipRemove && connectedClients.Count >= serverSettings.MaxPlayers)
|
||||
if (connectedClients.Count >= serverSettings.MaxPlayers)
|
||||
{
|
||||
RemovePendingClient(pendingClient, PeerDisconnectPacket.WithReason(DisconnectReason.ServerFull));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user