no longer make reports for games terminated as cheated
This commit is contained in:
parent
a3e863eee4
commit
4fb0824ff0
|
@ -94,7 +94,7 @@ object Main extends LilaController {
|
|||
val referer = HTTPRequest.referer(ctx.req)
|
||||
val name = get("n", ctx.req) | "?"
|
||||
lila.mon.cheat.cssBot()
|
||||
ctx.userId.ifFalse(known) ?? {
|
||||
ctx.userId.ifTrue(!known && name != "ceval") ?? {
|
||||
Env.report.api.autoBotReport(_, referer, name)
|
||||
}
|
||||
lila.game.GameRepo pov id flatMap {
|
||||
|
|
|
@ -5,9 +5,7 @@ import chess.Color
|
|||
|
||||
import lila.game.{ Game, GameRepo, Pov }
|
||||
|
||||
private[round] final class CheatDetector(reporter: ActorSelection) {
|
||||
|
||||
private val createReport = false
|
||||
private[round] final class CheatDetector {
|
||||
|
||||
def apply(game: Game): Fu[Option[Color]] = interesting(game) ?? {
|
||||
GameRepo findMirror game map {
|
||||
|
@ -15,8 +13,6 @@ private[round] final class CheatDetector(reporter: ActorSelection) {
|
|||
mirror.players map (p => p -> p.userId) collectFirst {
|
||||
case (player, Some(userId)) => game.players find (_.userId == player.userId) map { cheater =>
|
||||
lila.log("cheat").info(s"${cheater.color} ($userId) @ ${game.id} uses ${mirror.id}")
|
||||
if (createReport) reporter ! lila.hub.actorApi.report.Cheater(userId,
|
||||
s"Cheat detected on ${gameUrl(game.id)}, using lichess AI: ${gameUrl(mirror.id)}")
|
||||
cheater.color
|
||||
}
|
||||
} flatten
|
||||
|
|
|
@ -162,7 +162,7 @@ final class Env(
|
|||
messenger = messenger,
|
||||
finisher = finisher)
|
||||
|
||||
private lazy val cheatDetector = new CheatDetector(reporter = hub.actor.report)
|
||||
private lazy val cheatDetector = new CheatDetector
|
||||
|
||||
lazy val messenger = new Messenger(
|
||||
chat = hub.actor.chat,
|
||||
|
|
Loading…
Reference in a new issue