From 82855820b53e908a56c791d99f4fd6375ade45c4 Mon Sep 17 00:00:00 2001 From: O3H Date: Sat, 27 Jul 2024 11:24:11 +0100 Subject: [PATCH] Update updater.ts --- bot/updater.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bot/updater.ts b/bot/updater.ts index 0a15bc1b..6b7b95d2 100644 --- a/bot/updater.ts +++ b/bot/updater.ts @@ -285,10 +285,10 @@ async function updateLastSeen() { ops.forEach((op: SeenPlayer) => { op.timestamp = now + if (!op.transitions) op.transitions = 0 + const seen = lastSeenPlayers.get(op.name) - if (seen?.online) { - op.transitions = op.transitions ? op.transitions + 1 : 0 - } + if (!seen?.online) op.transitions++ lastSeenPlayers.set(op.name, op) })