(d3653c241) Fixed GameServer.UnbanPlayer passing the name to BanList in lower case even though BanList was case sensitive (preventing unbanning clients with the "unban" command if their name is not in lower case)

This commit is contained in:
Joonas Rikkonen
2019-06-15 19:46:29 +03:00
parent b85da6bc53
commit 3e1dd274bb
2 changed files with 2 additions and 2 deletions

View File

@@ -184,7 +184,8 @@ namespace Barotrauma.Networking
public void UnbanPlayer(string name)
{
var player = bannedPlayers.Find(bp => bp.Name == name);
name = name.ToLower();
var player = bannedPlayers.Find(bp => bp.Name.ToLower() == name);
if (player == null)
{
DebugConsole.Log("Could not unban player \"" + name + "\". Matching player not found.");

View File

@@ -2190,7 +2190,6 @@ namespace Barotrauma.Networking
public override void UnbanPlayer(string playerName, string playerIP)
{
playerName = playerName.ToLowerInvariant();
if (!string.IsNullOrEmpty(playerIP))
{
serverSettings.BanList.UnbanIP(playerIP);