fix introduced bug :)
This commit is contained in:
parent
1f1f4de67a
commit
c41fc27a1a
@ -558,7 +558,7 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
|
|||||||
{
|
{
|
||||||
var result = DeterminePenaltyResult(clientDetection.ProcessHit(oldestHit), attacker);
|
var result = DeterminePenaltyResult(clientDetection.ProcessHit(oldestHit), attacker);
|
||||||
|
|
||||||
if (Utilities.IsDevelopment)
|
if (!Utilities.IsDevelopment)
|
||||||
{
|
{
|
||||||
await ApplyPenalty(result, attacker);
|
await ApplyPenalty(result, attacker);
|
||||||
}
|
}
|
||||||
@ -622,13 +622,21 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
|
|||||||
|
|
||||||
private bool ShouldUseDetection(Server server, DetectionType detectionType, long clientId)
|
private bool ShouldUseDetection(Server server, DetectionType detectionType, long clientId)
|
||||||
{
|
{
|
||||||
bool shouldRun = true;
|
|
||||||
var detectionTypes = Plugin.Config.Configuration().AnticheatConfiguration.ServerDetectionTypes;
|
var detectionTypes = Plugin.Config.Configuration().AnticheatConfiguration.ServerDetectionTypes;
|
||||||
var ignoredClients = Plugin.Config.Configuration().AnticheatConfiguration.IgnoredClientIds;
|
var ignoredClients = Plugin.Config.Configuration().AnticheatConfiguration.IgnoredClientIds;
|
||||||
|
|
||||||
|
if (ignoredClients.Contains(clientId))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
shouldRun &= !detectionTypes[server.EndPoint].Contains(detectionType);
|
if (detectionTypes[server.EndPoint].Contains(detectionType))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
catch (KeyNotFoundException)
|
catch (KeyNotFoundException)
|
||||||
@ -636,8 +644,7 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
shouldRun &= !ignoredClients.Any(_clientId => _clientId == clientId);
|
return true;
|
||||||
return shouldRun;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async Task ApplyPenalty(DetectionPenaltyResult penalty, EFClient attacker)
|
async Task ApplyPenalty(DetectionPenaltyResult penalty, EFClient attacker)
|
||||||
|
Loading…
Reference in New Issue
Block a user