Permalink
Browse files

Adding catshirt (Nic Luciano)'s changes to evl's branch

  • Loading branch information...
1 parent 163ab83 commit 233cc43dfbeff6f3908d9d23cec33405e7219181 @wraithan wraithan committed Oct 31, 2011
Showing with 6 additions and 4 deletions.
  1. +1 −1 README.rst
  2. +3 −1 docs/API.rst
  3. +2 −2 lib/irc.js
View
@@ -57,7 +57,7 @@ or to a particular channel::
At the moment there are functions for joining::
- client.join('#yourchannel');
+ client.join('#yourchannel yourpass');
parting::
View
@@ -63,7 +63,9 @@ Client
:param string channel: Channel to join
:param function callback: Callback to automatically subscribed to the
- `join#channel` event, but removed after the first invocation.
+ `join#channel` event, but removed after the first invocation. `channel`
+ supports multiple JOIN arguments as a space separated string (similar to
+ the IRC protocol).
.. js:function:: Client.part(channel, callback)
View
@@ -412,7 +412,7 @@ function Client(server, nick, opt) {
self.addListener('kick', function(channel, who, by, reason) {
if ( self.opt.autoRejoin )
- self.send('JOIN', channel);
+ self.send.apply(self, ['JOIN'].concat(channel.split(' ')));
});
self.addListener('motd', function (motd) {
self.opt.channels.forEach(function(channel) {
@@ -612,7 +612,7 @@ Client.prototype.join = function(channel, callback) { // {{{
return callback.apply(this, arguments);
}
});
- this.send('JOIN', channel);
+ this.send.apply(this, ['JOIN'].concat(channel.split(' ')));
} // }}}
Client.prototype.part = function(channel, callback) { // {{{
if ( typeof(callback) == 'function' ) {

0 comments on commit 233cc43

Please sign in to comment.