only show 3 games in auto reports

This commit is contained in:
Thibault Duplessis 2014-01-14 01:55:53 +01:00
parent 92fc7ff244
commit c49381ef96
2 changed files with 3 additions and 3 deletions

View file

@ -25,8 +25,8 @@ case class Evaluation(
case Evaluation.Mark "definitely cheating"
}
def reportText = {
val gameText = games map { g s"${g.url} $g" } mkString "\n"
def reportText(maxGames: Int = 10) = {
val gameText = games take maxGames map { g s"${g.url} $g" } mkString "\n"
s"[AUTOREPORT] Cheat evaluation: $percent%\n$gameText"
}
}

View file

@ -45,7 +45,7 @@ final class Evaluator(
val g = perfs.global.glicko
((g.deviation <= autoDeviationThreshold && g.rating >= autoRatingThreshold) ?? generate(user.id, false)) foreach {
case Some(eval) if (eval.action == Evaluation.Report)
reporter ! lila.hub.actorApi.report.Cheater(user.id, eval.reportText)
reporter ! lila.hub.actorApi.report.Cheater(user.id, eval reportText 3)
case _
}
}