From 9c6b78863ef34bf9cff2b7ec0ed3e1e7d64bc796 Mon Sep 17 00:00:00 2001 From: reality Date: Sun, 9 Jun 2013 17:42:41 +0000 Subject: [PATCH] fuck regex --- modules/nickserv/nickserv.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/nickserv/nickserv.js b/modules/nickserv/nickserv.js index f96c6c5..3299f36 100644 --- a/modules/nickserv/nickserv.js +++ b/modules/nickserv/nickserv.js @@ -38,10 +38,10 @@ var nickserv = function(dbot) { } } } else if(event.action == '302') { - var match = event.params.match(/:(.+)(\*)?=([^@]+)@(.+)$/); - console.log(match); + var match = event.params.match(/:(.+)=([^@]+)@(.+)$/); if(match && _.has(this.userStack, event.server) && _.has(this.userStack[event.server], match[1])) { - this.userStack[event.server][match[1]](match[4].trim()); + match[1] = match[1].replace('\*', ''); + this.userStack[event.server][match[1]](match[3].trim()); } } }.bind(this);