Skip to content

Commit

Permalink
checked 1st argument in (dis)connect evaluates to false instead
Browse files Browse the repository at this point in the history
  • Loading branch information
fent committed Oct 1, 2011
1 parent f18a86e commit 7c37a55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/irc.js
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ Client.prototype.conn = null;
Client.prototype.chans = {};
Client.prototype._whoisData = {};
Client.prototype.connect = function ( retryCount, callback ) { // {{{
if (typeof(retryCount) === 'function') {
if (!retryCount || typeof(retryCount) === 'function') {
callback = retryCount;
retryCount = 0;
}
Expand Down Expand Up @@ -925,7 +925,7 @@ Client.prototype.connect = function ( retryCount, callback ) { // {{{
});
}; // }}}
Client.prototype.disconnect = function ( message, callback ) { // {{{
if (typeof(message) === 'function') {
if (!message || typeof(message) === 'function') {
callback = message;
message = "node-irc says goodbye";
}
Expand Down

0 comments on commit 7c37a55

Please sign in to comment.