that should do it did i mention fuck regex

This commit is contained in:
reality 2013-06-09 17:51:49 +00:00
parent 6b9cf29e95
commit 9226da5b76

View File

@ -39,9 +39,9 @@ var nickserv = function(dbot) {
} }
} else if(event.action == '302') { } else if(event.action == '302') {
var match = event.params.match(/:(.+)=([^@]+)@(.+)$/); var match = event.params.match(/:(.+)=([^@]+)@(.+)$/);
console.log(match);
if(match[1]) match[1] = match[1].replace('\*', '');
if(match && _.has(this.userStack, event.server) && _.has(this.userStack[event.server], match[1])) { if(match && _.has(this.userStack, event.server) && _.has(this.userStack[event.server], match[1])) {
match[1] = match[1].replace('\*', '');
this.userStack[event.server][match[1]](match[3].trim()); this.userStack[event.server][match[1]](match[3].trim());
} }
} }