From 569897986263fa2cc1296dc3c464c1ebedbd7eae Mon Sep 17 00:00:00 2001 From: Peter Defebvre Date: Tue, 7 May 2013 17:27:16 -0700 Subject: [PATCH] Fix Cient.join: when user specify a password --- lib/irc.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/irc.js b/lib/irc.js index 79e96007..400a02dc 100644 --- a/lib/irc.js +++ b/lib/irc.js @@ -52,7 +52,7 @@ function Client(server, nick, opt) { channelPrefixes: "&#", messageSplit: 512 }; - + // Features supported by the server // (initial values are RFC 1459 defaults. Zeros signify // no default or unlimited value) @@ -123,7 +123,6 @@ function Client(server, nick, opt) { value = value.split(','); var type = ['a','b','c','d'] for (var i = 0; i < type.length; i++) { - self.supported.channel.modes[type[i]] += value[i]; } break; @@ -729,7 +728,8 @@ Client.prototype.activateFloodProtection = function(interval) { // {{{ }; // }}} Client.prototype.join = function(channel, callback) { // {{{ - this.once('join' + channel, function () { + var channelName = channel.split(' ')[0]; + this.once('join' + channelName, function () { // if join is successful, add this channel to opts.channels // so that it will be re-joined upon reconnect (as channels // specified in options are)