mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 15:20:48 -05:00
fix introduced bug :)
This commit is contained in:
@ -557,8 +557,8 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
|
||||
if (oldestHit.IsAlive)
|
||||
{
|
||||
var result = DeterminePenaltyResult(clientDetection.ProcessHit(oldestHit), attacker);
|
||||
|
||||
if (Utilities.IsDevelopment)
|
||||
|
||||
if (!Utilities.IsDevelopment)
|
||||
{
|
||||
await ApplyPenalty(result, attacker);
|
||||
}
|
||||
@ -622,13 +622,21 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
|
||||
|
||||
private bool ShouldUseDetection(Server server, DetectionType detectionType, long clientId)
|
||||
{
|
||||
bool shouldRun = true;
|
||||
var detectionTypes = Plugin.Config.Configuration().AnticheatConfiguration.ServerDetectionTypes;
|
||||
var ignoredClients = Plugin.Config.Configuration().AnticheatConfiguration.IgnoredClientIds;
|
||||
|
||||
if (ignoredClients.Contains(clientId))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
shouldRun &= !detectionTypes[server.EndPoint].Contains(detectionType);
|
||||
if (detectionTypes[server.EndPoint].Contains(detectionType))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
catch (KeyNotFoundException)
|
||||
@ -636,8 +644,7 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
|
||||
|
||||
}
|
||||
|
||||
shouldRun &= !ignoredClients.Any(_clientId => _clientId == clientId);
|
||||
return shouldRun;
|
||||
return true;
|
||||
}
|
||||
|
||||
async Task ApplyPenalty(DetectionPenaltyResult penalty, EFClient attacker)
|
||||
|
Reference in New Issue
Block a user