From 7c37a55b9ee9018c00ce1a8c71f314deff241708 Mon Sep 17 00:00:00 2001 From: Roly Fentanes Date: Sat, 1 Oct 2011 04:07:35 -0700 Subject: [PATCH] checked 1st argument in (dis)connect evaluates to false instead --- lib/irc.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/irc.js b/lib/irc.js index c74458f8..a90b0808 100644 --- a/lib/irc.js +++ b/lib/irc.js @@ -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; } @@ -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"; }