Check for channel not nick [#201]

This commit is contained in:
Sam Nicholls 2013-01-24 00:30:22 +00:00
parent 35c9975d44
commit e2073f557c

View File

@ -71,7 +71,7 @@ var api = function(dbot) {
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; if(!_.has(dbot.instance.connections[server].channels, channel)) 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) {