exclude BOTs from "active players" leaderboard
parent
5b05c4a13f
commit
c766c36651
|
@ -22,7 +22,7 @@ final class UserRepo(val coll: Coll)(implicit ec: scala.concurrent.ExecutionCont
|
|||
val normalize = User normalize _
|
||||
|
||||
def topNbGame(nb: Int): Fu[List[User]] =
|
||||
coll.find(enabledSelect).sort($sort desc "count.game").cursor[User]().list(nb)
|
||||
coll.find(enabledNoBotSelect).sort($sort desc "count.game").cursor[User]().list(nb)
|
||||
|
||||
def byId(id: ID): Fu[Option[User]] = User.noGhost(id) ?? coll.byId[User](id)
|
||||
|
||||
|
@ -277,6 +277,10 @@ final class UserRepo(val coll: Coll)(implicit ec: scala.concurrent.ExecutionCont
|
|||
$doc(F.marks -> UserMark.Boost.key),
|
||||
$doc(F.marks -> UserMark.Troll.key)
|
||||
)
|
||||
val enabledNoBotSelect = $and(
|
||||
$doc(F.enabled -> true),
|
||||
$doc(F.title -> $ne(Title.BOT))
|
||||
)
|
||||
def stablePerfSelect(perf: String) =
|
||||
$doc(s"perfs.$perf.gl.d" -> $lt(lila.rating.Glicko.provisionalDeviation))
|
||||
val patronSelect = $doc(s"${F.plan}.active" -> true)
|
||||
|
|
Loading…
Reference in New Issue