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) { if(!resolvedUser) {
resolvedUser = _.find(knownUsers.aliases, function(nick, alias) { resolvedUser = _.find(knownUsers.aliases, function(nick, alias) {
console.log(alias + ' -> ' + nick);
var toMatch = new RegExp(user, "i"); var toMatch = new RegExp(user, "i");
return alias.match(toMatch) !== null; if(alias.match(toMatch) !== null) return nick;
}, this); }, this);
user = knownUsers.aliases[resolvedUser];
} else {
user = resolvedUser;
} }
user = resolvedUser;
} }
return user; return user;