3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-27 14:29:29 +01:00

i hate computers

This commit is contained in:
reality 2013-01-15 23:32:45 +00:00
parent e403d1d7f1
commit 21f4bc4ad6

View File

@ -20,13 +20,13 @@ var api = function(dbot) {
if(!resolvedUser) {
resolvedUser = _.find(knownUsers.aliases, function(nick, alias) {
console.log(alias + ' -> ' + nick);
var toMatch = new RegExp(user, "i");
return alias.match(toMatch) !== null;
if(alias.match(toMatch) !== null) return nick;
}, this);
user = knownUsers.aliases[resolvedUser];
} else {
user = resolvedUser;
}
user = resolvedUser;
}
return user;