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)) { if(this.servers.hasOwnProperty(name)) {
var server = this.servers[name]; var server = this.servers[name];
this.instance.addConnection(name, server.server, server.port, this.admin, function(event) { this.instance.addConnection(name, server.server, server.port, this.admin, function(event) {
server.channels.each(function(channel) { var server = this.servers[event.server];
console.log('joining ' + channel + ' on ' + server.server); for(var i=0;i<server.channels.length;i++) {
this.instance.join(event, channel) this.instance.join(event, server.channels[i]);
}.bind(this)); }
}.bind(this), server.nickserv, server.password); }.bind(this), server.nickserv, server.password);
} }
} }