fix issue causing chat from other clients of same user in same room not getting through most of the time
bot was constantly sending chat every 1.6 seconds even when queue is empty herp derp
This commit is contained in:
parent
f2185a0887
commit
00bea9d9ab
|
@ -171,7 +171,8 @@ global.createMPPbridge = function createMPPbridge(room, DiscordChannelID, site =
|
|||
msgQueue.push(str);
|
||||
});
|
||||
setInterval(()=>{
|
||||
gClient.sendArray([{m:'a', message: msgQueue.shift()}]);
|
||||
let message = msgQueue.shift();
|
||||
if (message) gClient.sendArray([{m:'a', message}]);
|
||||
}, 1600); // just about fastest without exceeding quota; I figured quota is 4 messages per 6 seconds in lobbies
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue