dont set name in test mode

This commit is contained in:
Lamp 2018-07-13 22:04:28 -07:00
parent 7f5cf7a905
commit a3f0928a25
No known key found for this signature in database
GPG Key ID: 0F1F8704BEDE369E
1 changed files with 3 additions and 1 deletions

View File

@ -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`);