From 6fa7527f9ffbbf20890a789c6425c50f81ba39d2 Mon Sep 17 00:00:00 2001 From: IrPgFKS0 <2511445@gmail.com> Date: Sun, 10 Sep 2023 13:16:23 -0700 Subject: [PATCH] Added is player not currently connected check. --- structures/DayzRBot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/structures/DayzRBot.js b/structures/DayzRBot.js index 2027c81..8819802 100644 --- a/structures/DayzRBot.js +++ b/structures/DayzRBot.js @@ -177,7 +177,7 @@ class DayzRBot extends Client { if (!this.exists(info.player) || !this.exists(info.playerID)) continue; // Skip this player if the player does not exist. let playerStat = s.find(stat => stat.playerID == info.playerID); - if (this.exists(playerStat.lastDisconnectionDate) && playerStat.lastDisconnectionDate !== null && playerStat.lastDisconnectionDate.getTime() > lastDetectedTime.getTime()) continue; // Skip this player if the lastDisconnectionDate time is later than the player log entry. + if (!previouslyConnected.includes(playerStat) && this.exists(playerStat.lastDisconnectionDate) && playerStat.lastDisconnectionDate !== null && playerStat.lastDisconnectionDate.getTime() > lastDetectedTime.getTime()) continue; // Skip this player if the lastDisconnectionDate time is later than the player log entry. // Check if the player session exists in the map. if (playerSessions.has(info.playerID)) {