diff --git a/Application/Server.cs b/Application/Server.cs index 6cef99202..7acb26af1 100644 --- a/Application/Server.cs +++ b/Application/Server.cs @@ -209,16 +209,8 @@ namespace IW4MAdmin var autoKickClient = (await Manager.GetClientService().Get(1)).AsPlayer(); autoKickClient.CurrentServer = this; - if (currentBan.Type == Penalty.PenaltyType.TempBan) - { - string formattedKick = String.Format( - RconParser.GetCommandPrefixes().Kick, - polledPlayer.ClientNumber, - $"{loc["SERVER_TB_REMAIN"]} ({(currentBan.Expires - DateTime.UtcNow).TimeSpanText()} {loc["WEBFRONT_PENALTY_TEMPLATE_REMAINING"]})"); - await this.ExecuteCommandAsync(formattedKick); - } // the player is permanently banned - else + if (currentBan.Type == Penalty.PenaltyType.Ban) { // don't store the kick message string formattedKick = String.Format( @@ -228,6 +220,15 @@ namespace IW4MAdmin await this.ExecuteCommandAsync(formattedKick); } + else + { + string formattedKick = String.Format( + RconParser.GetCommandPrefixes().Kick, + polledPlayer.ClientNumber, + $"{loc["SERVER_TB_REMAIN"]} ({(currentBan.Expires - DateTime.UtcNow).TimeSpanText()} {loc["WEBFRONT_PENALTY_TEMPLATE_REMAINING"]})"); + await this.ExecuteCommandAsync(formattedKick); + } + // reban the "evading" guid if (player.Level != Player.Permission.Banned && currentBan.Type == Penalty.PenaltyType.Ban) await player.Ban($"{currentBan.Offense}", autoKickClient); diff --git a/Plugins/Stats/Cheat/Detection.cs b/Plugins/Stats/Cheat/Detection.cs index d359479cc..5f8f9f81a 100644 --- a/Plugins/Stats/Cheat/Detection.cs +++ b/Plugins/Stats/Cheat/Detection.cs @@ -194,7 +194,7 @@ namespace IW4MAdmin.Plugins.Stats.Cheat if (currentHeadshotRatio > maxHeadshotLerpValueForFlag) { // ban on headshot - if (currentHeadshotRatio > maxHeadshotLerpValueForFlag) + if (currentHeadshotRatio > maxHeadshotLerpValueForBan) { Log.WriteDebug("**Maximum Headshot Ratio Reached For Ban**"); Log.WriteDebug($"ClientId: {kill.AttackerId}");