From a433b592c95df5878b5123196c6d345a4476e6b4 Mon Sep 17 00:00:00 2001 From: reality Date: Tue, 15 Jan 2013 21:58:47 +0000 Subject: [PATCH] wat --- modules/users/api.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/users/api.js b/modules/users/api.js index 471fab6..e59c895 100644 --- a/modules/users/api.js +++ b/modules/users/api.js @@ -14,13 +14,13 @@ var api = function(dbot) { // this is retarded user = user.toLowerCase(); var resolvedUser = _.find(knownUsers.users, function(nick) { - var toMatch = new RegExp(user, "i"); + var toMatch = new RegExp(_.escape(user), "i"); return nick.match(toMatch) !== null; }, this); if(!resolvedUser) { resolvedUser = _.find(knownUsers.aliases, function(nick, alias) { - var toMatch = new RegExp(user, "i"); + var toMatch = new RegExp(_.escape(user), "i"); return alias.match(toMatch) !== null; }, this); user = knownUsers.aliases[resolvedUser];