mirror of
https://github.com/reality/dbot.git
synced 2024-11-30 16:09:27 +01:00
fix regex glober
This commit is contained in:
parent
a554b8d1cf
commit
a4009d7ff3
@ -54,9 +54,10 @@ var api = function(dbot) {
|
||||
*/
|
||||
'applyRegex': function(commandName, event) {
|
||||
var applies = false;
|
||||
event.message = event.message.substring(1);
|
||||
if(_.has(dbot.commands[commandName], 'regex')) {
|
||||
var cRegex = dbot.commands[commandName].regex;
|
||||
if(_.isArray(cRegex) && cRegex.length == 2) {
|
||||
if(_.isArray(cRegex) && cRegex.length === 2) {
|
||||
var q = event.message.valMatch(cRegex[0], cRegex[1]);
|
||||
if(q) {
|
||||
applies = true;
|
||||
|
@ -53,10 +53,6 @@ var command = function(dbot) {
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
else if(_.has(dbot.modules, 'quotes')) {
|
||||
commandName = this.config.commandPrefix;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user