fix channel joins on multi server

This commit is contained in:
Luke Slater 2012-05-25 21:36:13 +01:00
parent 1e23e18807
commit 40ddb682fa

8
run.js
View File

@ -77,10 +77,10 @@ var DBot = function(timers) {
if(this.servers.hasOwnProperty(name)) {
var server = this.servers[name];
this.instance.addConnection(name, server.server, server.port, this.admin, function(event) {
server.channels.each(function(channel) {
console.log('joining ' + channel + ' on ' + server.server);
this.instance.join(event, channel)
}.bind(this));
var server = this.servers[event.server];
for(var i=0;i<server.channels.length;i++) {
this.instance.join(event, server.channels[i]);
}
}.bind(this), server.nickserv, server.password);
}
}