From 0ca237ed09422c6a333ea19df8aa48bebf66122c Mon Sep 17 00:00:00 2001 From: Thibault Duplessis Date: Mon, 17 Mar 2014 22:11:10 +0100 Subject: [PATCH] don't create reports on cheat detected --- modules/round/src/main/CheatDetector.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/round/src/main/CheatDetector.scala b/modules/round/src/main/CheatDetector.scala index b453c340b1..925ed99c13 100644 --- a/modules/round/src/main/CheatDetector.scala +++ b/modules/round/src/main/CheatDetector.scala @@ -7,13 +7,15 @@ import lila.game.{ Game, GameRepo, Pov } private[round] final class CheatDetector(reporter: ActorSelection) { + private val createReport = false + def apply(game: Game): Fu[Option[Color]] = interesting(game) ?? { GameRepo findMirror game map { _ ?? { mirror => mirror.players map (p => p -> p.userId) collectFirst { case (player, Some(userId)) => game.players find (_.userId == player.userId) map { cheater => play.api.Logger("cheat detector").info(s"${cheater.color} ($userId) @ ${game.id} uses ${mirror.id}") - reporter ! lila.hub.actorApi.report.Cheater(userId, + if (createReport) reporter ! lila.hub.actorApi.report.Cheater(userId, s"Cheat detected on ${gameUrl(game.id)}, using lichess AI: ${gameUrl(mirror.id)}") cheater.color }