From a5eda46339154c5bd3653b29b7a78e7d073b992a Mon Sep 17 00:00:00 2001 From: reality Date: Wed, 21 Aug 2013 19:57:19 +0000 Subject: [PATCH] some fixes for punctuation --- modules/report/report.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/report/report.js b/modules/report/report.js index cc7d0fb..851fe5e 100644 --- a/modules/report/report.js +++ b/modules/report/report.js @@ -140,12 +140,12 @@ var report = function(dbot) { cChan + "\u000f"; } - _.each(message.match(/@([\d\w\s*|-]+?)( |$)/g), function(user) { - user = user.replace(/@([\d\w\s*|-]+?)( |$)/, "$1"); + _.each(message.match(/@([\d\w\s*|-]+?)( |$|,|\.)/g), function(user) { + user = user.replace(/@([\d\w\s*|-]+?)( |$|,|\.)/, "$1"); notifier += '[' + colours['nicks'] + user + '\u000f]'; }); - message = message.replace(/@([\d\w\s*|-]+?)( |$)/g, colours['nicks'] + - "@$1\u000f "); + message = message.replace(/@([\d\w\s*|-]+?)( |$|,|\.)/g, colours['nicks'] + + "@$1\u000f$2"); } this.api.notify(event.server, channelName, dbot.t('notify', {