3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-25 04:02:39 +01:00

Update regex.js

Enable users to correct other users suffixing usernames with either comma or colon.
This commit is contained in:
RCTrapdoor 2014-06-19 14:21:54 +02:00
parent c50975672e
commit 71bda91639

View File

@ -3,7 +3,7 @@ var _ = require('underscore')._;
var regex = function(dbot) { var regex = function(dbot) {
this.last = {}; this.last = {};
this.listener = function(event) { this.listener = function(event) {
var q = event.message.valMatch(/^([\d\w\s]*)?:? ?s\/(.+)\/(.+)?\/([ig]*)?$/, 5); var q = event.message.valMatch(/^([\d\w\s]*)?[:|,]? ?s\/(.+)\/(.+)?\/([ig]*)?$/, 5);
if(q) { if(q) {
var flags = q[4], var flags = q[4],
toMatch = new RegExp(q[2], flags), toMatch = new RegExp(q[2], flags),