From a3f0928a253330e3b48d7f5bf6648d9e7fa3e264 Mon Sep 17 00:00:00 2001 From: Lamp Date: Fri, 13 Jul 2018 22:04:28 -0700 Subject: [PATCH] dont set name in test mode --- src/mppbridger/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mppbridger/index.js b/src/mppbridger/index.js index f51c7b0..5bb6a8c 100755 --- a/src/mppbridger/index.js +++ b/src/mppbridger/index.js @@ -67,9 +67,11 @@ global.createMPPbridge = function createMPPbridge(room, DiscordChannelID, site = gClient.on('connect', () => { console.log(`Connected to room ${room} of ${site} server`); dSend(`**Connected**`); // TODO say what room it actually connected to ? - gClient.sendArray([{m: "userset", set: {name: config.mppname}}]) isConnected = true; }); + gClient.on('hi', ()=>{ + if (!testmode) gClient.sendArray([{m: "userset", set: {name: config.mppname}}]) + }); gClient.on('disconnect', () => { if (isConnected) { console.log(`Disconnected from room ${room} of ${site} server`);