parent
20d4ab27d3
commit
672d45df7c
@ -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);
|
||||
|
@ -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}");
|
||||
|
Loading…
Reference in New Issue
Block a user