From 21f4bc4ad6302de475e8958cd5ec144cd96ca47a Mon Sep 17 00:00:00 2001 From: reality Date: Tue, 15 Jan 2013 23:32:45 +0000 Subject: [PATCH] i hate computers --- modules/users/api.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/users/api.js b/modules/users/api.js index 471fab6..6ec0ce5 100644 --- a/modules/users/api.js +++ b/modules/users/api.js @@ -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;