From 1d0f13a522611a8c39196fbd9af73bb0fb3167bb Mon Sep 17 00:00:00 2001 From: MrGeorgen Date: Sun, 28 Jun 2020 23:26:19 +0200 Subject: [PATCH] Bug fix: antiAntiAfk Messages have been send even if the player was online --- src/main.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.js b/src/main.js index 7ed550b..29b92fd 100644 --- a/src/main.js +++ b/src/main.js @@ -181,7 +181,7 @@ function join() { proxyClient = null } stop(); - log("Connection reset by 2b2t server. Reconnecting..."); + if (!stoppedByPlayer) log("Connection reset by 2b2t server. Reconnecting..."); if (config.reconnect.onError) setTimeout(reconnect, 6000); }); @@ -239,7 +239,9 @@ function join() { filterPacketAndSend(data, meta, client); }); newProxyClient.on("end", () => { - antiAntiAfkmsg(); + setTimeout(function(){ + if (webserver.isInQueue) antiAntiAfkmsg(); + },1000); }) proxyClient = newProxyClient;