Removed unused BanClient method

This commit is contained in:
Joonas Rikkonen
2018-07-19 17:42:03 +03:00
parent 30a453191f
commit 8cd7919009
@@ -1584,23 +1584,6 @@ namespace Barotrauma.Networking
BanClient(client, reason, range, duration); 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) public void BanClient(Client client, string reason, bool range = false, TimeSpan? duration = null)
{ {
if (client == null) return; if (client == null) return;