This commit is contained in:
reality 2013-04-14 13:58:45 +00:00
parent de2a22834d
commit 5e0f126693

View File

@ -53,11 +53,19 @@ var api = function(dbot) {
var applies = false;
if(_.has(dbot.commands[commandName], 'regex')) {
var cRegex = dbot.commands[commandName].regex;
if(_.isArray(cRegex) && cRegex.length == 2) {
var q = event.message.valMatch(cRegex[0], cRegex[1]);
if(q) {
applies = true;
event.input = q;
}
} else if {
var q = event.message.match(cRegex);
if(q) {
applies = true;
event.input = q;
]
}
} else {
applies = true;
}