From 21fd93cfbd0fdb1ae74720e59c28d8de5d4f65af Mon Sep 17 00:00:00 2001 From: "Michael C. Harris" Date: Tue, 3 Apr 2012 04:28:48 +0000 Subject: [PATCH] Bump jerk requirement. Jerk 1.1.18 changed the msg.source from a string to a Channel object so that you can iterate through clients in a channel. Need to cast the source to get the channel name. --- package.json | 2 +- plugins/tell.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index fe96287..f68e271 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ }, "engines": { "node": ">=0.6.0" }, "dependencies": { - "jerk": ">=1.1.16", + "jerk": ">=1.1.18", "tiny": ">=0.0.2", "coloured": ">=0.2.0", "log": ">=1.1.1", diff --git a/plugins/tell.js b/plugins/tell.js index 6ce5b58..63c1003 100644 --- a/plugins/tell.js +++ b/plugins/tell.js @@ -39,7 +39,7 @@ Tell.prototype.gotDb = function (incomingDb) { } var isChannel = function (source) { // check source (# or & means it's a channel) - var first = source.substr(0, 1); + var first = String(source).substr(0, 1); if ('#' === first || '&' === first) { return true; } @@ -61,7 +61,7 @@ var tellHandler = function (msg) { myInterface.uniqueId(), { recipient: tellNick, - source: msg.source, + source: String(msg.source), msg: { time: Date.now(), sender: msg.user, @@ -103,7 +103,7 @@ var activityHandler = function (msg, prompt) { } db.fetch({}, function (doc, key) { - if (doc.source == msg.source && doc.recipient == msg.user) { + if (doc.source == String(msg.source) && doc.recipient == msg.user) { return true; } },