forked from GitHub/dbot
fix channel joins on multi server
This commit is contained in:
parent
1e23e18807
commit
40ddb682fa
8
run.js
8
run.js
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user