From 8be61b746d70544ce528a89e6d56a68d128fb954 Mon Sep 17 00:00:00 2001 From: Sam Nicholls Date: Thu, 24 Jan 2013 00:23:26 +0000 Subject: [PATCH] Stop nicks property error [#201] --- modules/users/api.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/users/api.js b/modules/users/api.js index 3ef59be..7357ab1 100644 --- a/modules/users/api.js +++ b/modules/users/api.js @@ -70,6 +70,8 @@ var api = function(dbot) { 'isOnline': function(server, user, channel, useLowerCase) { var user = this.api.resolveUser(server, user, useLowerCase); var possiNicks = [user].concat(this.api.getAliases(server, user)); + + if(!_.has(dbot.instance.connections[server].channels[channel], nicks)) return false; var onlineNicks = dbot.instance.connections[server].channels[channel].nicks; return _.any(onlineNicks, function(nick) {