From 9d5bc776f462a7998b4c3b818fd5631c9d14ed37 Mon Sep 17 00:00:00 2001 From: ChomeNS Date: Thu, 17 Nov 2022 07:42:23 +0700 Subject: [PATCH] fix end + add chipmunk server --- config.js | 5 +++++ plugins/proxy.js | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/config.js b/config.js index 1f3434f..62a375a 100644 --- a/config.js +++ b/config.js @@ -49,6 +49,7 @@ module.exports = { '192.168.1.103': '1002806756885413978', 'kitsune.icu': '1004006678460637315', 'mc.chomens41793.ga': '1010734897796763758', + '71.179.136.66': '1042590315464364032', }, 'prefix': '!', }, @@ -65,6 +66,10 @@ module.exports = { 'host': 'kitsune.icu', 'port': 25565, }, + { + 'host': '71.179.136.66', + 'port': 25565, + }, // { // 'host': 'mc.chomens41793.ga', // 'port': 25565, diff --git a/plugins/proxy.js b/plugins/proxy.js index cd393b3..97d7a8f 100644 --- a/plugins/proxy.js +++ b/plugins/proxy.js @@ -16,6 +16,8 @@ function inject(bot, dcclient, config) { version, }); + bot.once('end', () => srv.close()); + srv.on('login', function(client) { bot.console.info(`[Proxy] ${client.username} connected to proxy`); let endedClient = false; @@ -98,8 +100,6 @@ function inject(bot, dcclient, config) { } targetClient.write(meta.name, data); }); - - bot.on('end', () => srv.close()); }); }); };