Closed ChristianGaertner closed 9 years ago
I'm sorry, but I don't see any benefit from wrapping the boot function in a callback, since it's supposed to run when lib/server.js is run from node directly.
I'm closing this, but feel free to resubmit if you can think of a good reason to do this.
Regards, Sebastian.
This callback allows to start the server and pre-create channels, without users connecting:
var server = null;
irc.boot(function(err, serv) {
server = serv;
});
someStuff(function() {
if (server != null) {
var keys = Object.keys(server.channels.registered);
var channel = server.channels.registered[keys[0]]
if (channel !== null) {
channel.send(':' + username + '!~' + username + '@host PRIVMSG #channel :' + message);
}
}
}
This allows to create bridges between non-irc chats to irc very easy, without this proposed callback there is no easy way to do this. atm.
But if you think, that this is not important, I am ok with that!
Cheers,
Christian
This way you can see when the server is booted.