From a0b6887797daba2c8cb4aa91c713f0ff09539893 Mon Sep 17 00:00:00 2001 From: whhhhhhh Date: Fri, 11 Oct 2024 14:30:32 +0900 Subject: [PATCH] irc changes --- features/irc/index.js | 9 +++++++++ metadata.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/features/irc/index.js b/features/irc/index.js index cd6d4c4..89b906a 100644 --- a/features/irc/index.js +++ b/features/irc/index.js @@ -55,6 +55,14 @@ function reset() { ws.connect(); } +function keepAlive() { + if (!enabled) return; + try { + ws?.send("/"); + } catch (error) {} + Async.schedule(keepAlive, 10000); +} + function auth() { ChatLib.chat("§8[§bIRC§8] §7Authenticating..."); const token = Client.getMinecraft().func_110432_I().func_148254_d(); @@ -82,6 +90,7 @@ export function enable() { trigger.register(); unloadTrigger.register(); reset(); + keepAlive(); ChatLib.chat("§8[§bIRC§8] §7Connecting..."); } diff --git a/metadata.json b/metadata.json index 203aa27..03fba70 100644 --- a/metadata.json +++ b/metadata.json @@ -2,7 +2,7 @@ "name": "soshimeeaddons", "description": "F7 on top", "creator": "soshimee", - "version": "2.8.0", + "version": "2.8.1", "entry": "index.js", "requires": ["PromiseV2", "BloomCore", "fparser", "requestV2", "Vigilance", "PogData", "RenderLib", "WebSocket", "Async"] }