3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-25 04:02:39 +01:00

Stop nicks property error [#201]

This commit is contained in:
Sam Nicholls 2013-01-24 00:23:26 +00:00
parent ed86f98427
commit 8be61b746d

View File

@ -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) {