mirror of
https://github.com/reality/dbot.git
synced 2024-12-24 11:42:36 +01:00
Merge branch 'master' of github.com:reality/depressionbot
This commit is contained in:
commit
874f78b09c
@ -3,7 +3,7 @@ var _ = require('underscore')._;
|
||||
var regex = function(dbot) {
|
||||
this.last = {};
|
||||
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) {
|
||||
var flags = q[4],
|
||||
toMatch = new RegExp(q[2], flags),
|
||||
@ -11,6 +11,8 @@ var regex = function(dbot) {
|
||||
last,
|
||||
replacement;
|
||||
|
||||
if(!replaceWith) replaceWith = "";
|
||||
|
||||
if(q[1] != null) {
|
||||
var user = q[1];
|
||||
last = this.last[event.channel.name][user];
|
||||
|
Loading…
Reference in New Issue
Block a user