From 8cd79190096a5299cbae93ee5067ba54f4a5426a Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Thu, 19 Jul 2018 17:42:03 +0300 Subject: [PATCH] Removed unused BanClient method --- .../Source/Networking/GameServer.cs | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/Barotrauma/BarotraumaShared/Source/Networking/GameServer.cs b/Barotrauma/BarotraumaShared/Source/Networking/GameServer.cs index 6dbd84ce9..60b587a89 100644 --- a/Barotrauma/BarotraumaShared/Source/Networking/GameServer.cs +++ b/Barotrauma/BarotraumaShared/Source/Networking/GameServer.cs @@ -1583,24 +1583,7 @@ namespace Barotrauma.Networking BanClient(client, reason, range, duration); } - - public void BanClient(NetConnection conn, string reason, bool range = false, TimeSpan? duration = null) - { - Client client = connectedClients.Find(c => c.Connection == conn); - if (client == null) - { - conn.Disconnect("You have been banned from the server"); - if (!banList.IsBanned(conn.RemoteEndPoint.Address.ToString())) - { - banList.BanPlayer("Unnamed", conn.RemoteEndPoint.Address.ToString(), reason, duration); - } - } - else - { - BanClient(client, reason, range); - } - } - + public void BanClient(Client client, string reason, bool range = false, TimeSpan? duration = null) { if (client == null) return;