Skip to content

Commit

Permalink
improved battle password handling, fix #1550
Browse files Browse the repository at this point in the history
  • Loading branch information
Licho1 committed Mar 6, 2017
1 parent 2a31c5a commit 2c7997c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Shared/LobbyClient/Battle.cs
Expand Up @@ -91,7 +91,7 @@ public virtual BattleHeader GetHeader()
SpectatorCount = b.SpectatorCount,
PlayerCount = b.NonSpectatorCount,
MaxPlayers = b.MaxPlayers,
Password = b.Password != null ? "?" : null,
Password = !string.IsNullOrEmpty(b.Password) ? "?" : "",
Mode = b.Mode,
IsRunning = b.IsInGame,
RunningSince = b.IsInGame ? b.RunningSince : null,
Expand Down
2 changes: 1 addition & 1 deletion ZkLobbyServer/autohost/Commands/CmdPassword.cs
Expand Up @@ -25,7 +25,7 @@ public override string Arm(ServerBattle battle, Say e, string arguments = null)
public override async Task ExecuteArmed(ServerBattle battle, Say e)
{
await battle.SwitchPassword(pwd);
await battle.SayBattle("battle room password changed");
await battle.SayBattle(string.IsNullOrEmpty(pwd) ? "battle password removed" : "battle room password changed");
}
}
}

0 comments on commit 2c7997c

Please sign in to comment.