diff --git a/Plugins/Stats/Cheat/Detection.cs b/Plugins/Stats/Cheat/Detection.cs index ede9df77e..275b8a1aa 100644 --- a/Plugins/Stats/Cheat/Detection.cs +++ b/Plugins/Stats/Cheat/Detection.cs @@ -205,7 +205,7 @@ namespace IW4MAdmin.Plugins.Stats.Cheat var lifeTimeHits = ClientStats.HitLocations.Sum(_loc => _loc.HitCount); ClientStats.AverageRecoilOffset = (ClientStats.AverageRecoilOffset * (lifeTimeHits - 1) + hitRecoilAverage) / lifeTimeHits; - if (sessionAverageRecoilAmount == 0 && HitCount > Thresholds.MediumSampleMinKills) + if (sessionAverageRecoilAmount == 0 && HitCount > Thresholds.LowSampleMinKills) { results.Add(new DetectionPenaltyResult() { @@ -216,7 +216,7 @@ namespace IW4MAdmin.Plugins.Stats.Cheat }); } - if (ClientStats.AverageRecoilOffset == 0 && HitCount >= Thresholds.LowSampleMinKills) + if (ClientStats.AverageRecoilOffset == 0 && HitCount >= Thresholds.HighSampleMinKills) { results.Add(new DetectionPenaltyResult() { diff --git a/Plugins/Stats/Helpers/StatManager.cs b/Plugins/Stats/Helpers/StatManager.cs index 6fd38b8ba..9f6854cf2 100644 --- a/Plugins/Stats/Helpers/StatManager.cs +++ b/Plugins/Stats/Helpers/StatManager.cs @@ -569,7 +569,7 @@ namespace IW4MAdmin.Plugins.Stats.Helpers { DetectionPenaltyResult result = new DetectionPenaltyResult() { ClientPenalty = EFPenalty.PenaltyType.Any }; #if DEBUG - if (clientDetection.QueuedHits.Count > 0) + if (clientDetection.TrackedHits.Count > 0) #else if (clientDetection.TrackedHits.Count > Detection.MAX_TRACKED_HIT_COUNT) #endif diff --git a/SharedLibraryCore/Services/PenaltyService.cs b/SharedLibraryCore/Services/PenaltyService.cs index 965cdd0e4..0e57cded5 100644 --- a/SharedLibraryCore/Services/PenaltyService.cs +++ b/SharedLibraryCore/Services/PenaltyService.cs @@ -172,14 +172,14 @@ namespace SharedLibraryCore.Services { var now = DateTime.UtcNow; - Expression> filter = (p) => new EFPenalty.PenaltyType[] + Expression> filter = (p) => (new EFPenalty.PenaltyType[] { EFPenalty.PenaltyType.TempBan, - EFPenalty.PenaltyType.Ban, - EFPenalty.PenaltyType.Flag + EFPenalty.PenaltyType.Ban }.Contains(p.Type) && p.Active && - (p.Expires == null || p.Expires > now); + (p.Expires == null || p.Expires > now)) || + (p.Type ==EFPenalty.PenaltyType.Flag && p.Active); using (var context = new DatabaseContext(true)) {