Merge pull request #202 from SamStudio8/master

Stop nicks property error [#201]
This commit is contained in:
Sam Nicholls 2013-01-23 16:24:48 -08:00
commit f4dcbd5506

View File

@ -70,6 +70,8 @@ var api = function(dbot) {
'isOnline': function(server, user, channel, useLowerCase) { 'isOnline': function(server, user, channel, useLowerCase) {
var user = this.api.resolveUser(server, user, useLowerCase); var user = this.api.resolveUser(server, user, useLowerCase);
var possiNicks = [user].concat(this.api.getAliases(server, user)); 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; var onlineNicks = dbot.instance.connections[server].channels[channel].nicks;
return _.any(onlineNicks, function(nick) { return _.any(onlineNicks, function(nick) {