mirror of
https://github.com/reality/dbot.git
synced 2024-12-28 05:32:50 +01:00
fuck regex
This commit is contained in:
parent
a395b17218
commit
9c6b78863e
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user