From a8ce9204633f523bb9ec1c338bd30b53e01c5a41 Mon Sep 17 00:00:00 2001 From: Kshitij Parajuli Date: Thu, 26 Sep 2013 21:27:17 -0400 Subject: [PATCH] Do getValue() of Boolean objects before comparing them Closes #268. --- lib/irclink.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/irclink.js b/lib/irclink.js index 15acff3..c8f6c5f 100644 --- a/lib/irclink.js +++ b/lib/irclink.js @@ -59,7 +59,7 @@ module.exports = function IRCLink(connID, app) { autoRejoin: false, channels: channels, floodProtection: true, - secure: userConn.ssl, + secure: userConn.ssl.valueOf(), selfSigned: userConn.selfSigned, encoding: userConn.encoding, certExpired: false, @@ -80,7 +80,7 @@ module.exports = function IRCLink(connID, app) { }; instance.logMessage = function(from, to, msg) { - if (!userConn.temporary) { + if (!userConn.temporary.valueOf()) { Message.create({ conn_id: connID , by: from @@ -92,7 +92,7 @@ module.exports = function IRCLink(connID, app) { }; instance.logPM = function(from, msg) { - if (!userConn.temporary) { + if (!userConn.temporary.valueOf()) { PrivateMessage.create({ conn_id: connID , by: from