Fix bridge saying everyone else joined/left when only the bot did

Closes #3
This commit is contained in:
Lamp 2018-12-14 05:14:45 +00:00
parent 2521add583
commit 8d7beab573
1 changed files with 6 additions and 5 deletions

View File

@ -180,12 +180,13 @@ global.createMPPbridge = function createMPPbridge(room, DiscordChannelID, site =
// announce join/leave // announce join/leave
gClient.on('participant added', async participant => { gClient.on("p", async participant => {
dSend(`\`${participant._id.substr(0,6)}\` ___**${sanitizeName(participant.name)}** entered the room.___`); dSend(`\`${participant._id.substr(0,6)}\` ___**${sanitizeName(participant.name)}** entered the room.___`);
});
gClient.on('participant removed', async participant => {
dSend(`\`${participant._id.substr(0,6)}\` ___**${sanitizeName(participant.name)}** left the room.___`);
}); });
gClient._events.bye.unshift(async msg => {
var participant = MPP.client.ppl[msg.p];
dSend(`\`${participant._id.substr(0,6)}\` ___**${sanitizeName(participant.name)}** left the room.___`);
})