forked from GitHub/dbot
lc fix for resolve user
This commit is contained in:
parent
be9ee61e13
commit
12db5c64e9
@ -24,6 +24,8 @@ var api = function(dbot) {
|
|||||||
return alias.match(toMatch);
|
return alias.match(toMatch);
|
||||||
}, this);
|
}, this);
|
||||||
user = knownUsers.aliases[resolvedUser];
|
user = knownUsers.aliases[resolvedUser];
|
||||||
|
} else {
|
||||||
|
user = resolvedUser;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,11 +56,6 @@ 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));
|
||||||
var onlineNicks = dbot.instance.connections[server].channels[channel].nicks;
|
var onlineNicks = dbot.instance.connections[server].channels[channel].nicks;
|
||||||
if(useLowerCase) {
|
|
||||||
possiNicks = _.map(possiNicks, function(nick) {
|
|
||||||
return nick.toLowerCase();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return _.any(onlineNicks, function(nick) {
|
return _.any(onlineNicks, function(nick) {
|
||||||
nick = nick.name;
|
nick = nick.name;
|
||||||
|
Loading…
Reference in New Issue
Block a user