Remove anticheat log when anticheat is disabled

Fixes #456
This commit is contained in:
miniduikboot committed 2022-11-01 08:03:53 +01:00
1 parent 116bb3cda4
commit 39b7d626dc
1 file changed
+2 -2
+2 -2
View File
@@ -37,13 +37,13 @@ namespace Impostor.Server.Net
public override async ValueTask<bool> 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);