From: miniduikboot Date: Mon, 31 Oct 2022 22:02:08 +0000 (+0100) Subject: Remove anticheat log when anticheat is disabled X-Git-Tag: v1.7.3~1 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=39b7d626dcb55691eccf48ef449d384f9221ec4a;p=rhonda%2Fimpostor.git Remove anticheat log when anticheat is disabled Fixes #456 --- diff --git a/src/Impostor.Server/Net/Client.cs b/src/Impostor.Server/Net/Client.cs index 1b2dcde..31f5a04 100644 --- a/src/Impostor.Server/Net/Client.cs +++ b/src/Impostor.Server/Net/Client.cs @@ -37,13 +37,13 @@ namespace Impostor.Server.Net public override async ValueTask ReportCheatAsync(CheatContext context, string message) { - _logger.LogWarning("Client {Name} ({Id}) was caught cheating: [{Context}] {Message}", Name, Id, context.Name, message); - if (!_antiCheatConfig.Enabled) { return false; } + _logger.LogWarning("Client {Name} ({Id}) was caught cheating: [{Context}] {Message}", Name, Id, context.Name, message); + if (_antiCheatConfig.BanIpFromGame) { Player?.Game.BanIp(Connection.EndPoint.Address);