Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Password support #51

Merged
merged 2 commits into from
Oct 31, 2011
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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::

Expand Down
4 changes: 3 additions & 1 deletion docs/API.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
6 changes: 3 additions & 3 deletions lib/irc.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,11 +412,11 @@ 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) {
self.send('JOIN', channel);
self.send.apply(self, ['JOIN'].concat(channel.split(' ')));
});
});

Expand Down Expand Up @@ -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' ) {
Expand Down