Code cleanup.

This commit is contained in:
Matthias Mailänder
2022-02-12 17:50:49 +01:00
committed by teinarss
parent 7735107deb
commit ee95d2591f
5 changed files with 6 additions and 7 deletions

View File

@@ -650,8 +650,7 @@ namespace OpenRA.Mods.Common.Server
server.SendOrderTo(kickConn, "ServerError", "You have been kicked from the server.");
server.DropClient(kickConn);
bool.TryParse(split[1], out var tempBan);
if (tempBan)
if (bool.TryParse(split[1], out var tempBan) && tempBan)
{
Log.Write("server", "Temporarily banning client {0} ({1}).", kickClientID, kickClient.IPAddress);
server.SendMessage($"{client.Name} temporarily banned {kickClient.Name} from the server.");