pause playban after server restart

pull/4131/merge
Thibault Duplessis 2018-03-12 07:16:58 -05:00
parent 9622be93e6
commit 5b83303f1b
1 changed files with 3 additions and 1 deletions

View File

@ -35,7 +35,9 @@ final class PlaybanApi(
}
private def IfBlameable[A: ornicar.scalalib.Zero](game: Game)(f: => Fu[A]): Fu[A] =
blameable(game) flatMap { _ ?? f }
lila.common.PlayApp.startedSinceMinutes(10) ?? {
blameable(game) flatMap { _ ?? f }
}
def abort(pov: Pov, isOnGame: Set[Color]): Funit = IfBlameable(pov.game) {
pov.player.userId.ifTrue(isOnGame(pov.opponent.color)) ?? { userId =>