delay irc channel join

This commit is contained in:
BuckarooBanzay 2020-03-15 16:57:02 +01:00
parent d47a54dc3d
commit 60b59b473b

View File

@ -22,12 +22,16 @@ module.exports = function(remote, events){
// map channels
client.on('registered', function() {
let delay = 5000;
Object.keys(remote.channels).forEach(ingame_name => {
const irc_name = remote.channels[ingame_name];
var channel = client.channel("#" + irc_name);
channel.join();
channel.say(`beerchat_proxy connected! ingame-channel: ${ingame_name}`);
channels[ingame_name] = channel;
setTimeout(function(){
const irc_name = remote.channels[ingame_name];
var channel = client.channel("#" + irc_name);
channel.join();
channel.say(`beerchat_proxy connected! ingame-channel: ${ingame_name}`);
channels[ingame_name] = channel;
}, delay);
delay += 2000;
});
});