Skip to content

Commit

Permalink
Bump jerk requirement.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
michaeltwofish committed Apr 3, 2012
1 parent 8444dd0 commit 21fd93c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions plugins/tell.js
Expand Up @@ -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;
}
Expand All @@ -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,
Expand Down Expand Up @@ -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;
}
},
Expand Down

0 comments on commit 21fd93c

Please sign in to comment.