monitor pool-like 5+0 hook creations
parent
c199ac0e08
commit
45dadcd7b9
|
@ -62,6 +62,7 @@ object mon {
|
|||
def acceptedRatedClock(clock: String) =
|
||||
inc(s"lobby.hook.a_r_clock.${clock.replace("+", "_")}")
|
||||
def joinMobile(isMobile: Boolean) = inc(s"lobby.hook.join_mobile.$isMobile")
|
||||
def likePoolFiveO(isMobile: Boolean) = inc(s"lobby.hook.like_pool_5_0.$isMobile")
|
||||
}
|
||||
object seek {
|
||||
val create = inc("lobby.seek.create")
|
||||
|
|
|
@ -6,10 +6,10 @@ import ornicar.scalalib.Random
|
|||
import play.api.libs.json._
|
||||
|
||||
import actorApi.LobbyUser
|
||||
import lila.common.PimpedJson._
|
||||
import lila.game.PerfPicker
|
||||
import lila.rating.RatingRange
|
||||
import lila.user.{ User, Perfs }
|
||||
import lila.common.PimpedJson._
|
||||
|
||||
// realtime chess, volatile
|
||||
case class Hook(
|
||||
|
@ -70,6 +70,9 @@ case class Hook(
|
|||
|
||||
lazy val perfType = PerfPicker.perfType(speed, realVariant, none)
|
||||
|
||||
def likePoolFiveO =
|
||||
realMode.rated && realVariant.standard && color == "random" && clock.show == "5+0"
|
||||
|
||||
private lazy val speed = Speed(clock.some)
|
||||
}
|
||||
|
||||
|
|
|
@ -72,6 +72,9 @@ private[lobby] final class Socket(
|
|||
if (hook.uid == member.uid || Biter.canJoin(hook, member.user)) member push msg
|
||||
}
|
||||
}
|
||||
if (hook.likePoolFiveO) withMember(hook.uid) { member =>
|
||||
lila.mon.lobby.hook.likePoolFiveO(member.mobile)()
|
||||
}
|
||||
}
|
||||
|
||||
case AddSeek(_) => notifySeeks
|
||||
|
|
Loading…
Reference in New Issue