From 6218def4df179cbf023bcf1df4f1d9016e59dea5 Mon Sep 17 00:00:00 2001 From: reality Date: Sun, 25 May 2014 17:16:53 +0000 Subject: [PATCH] tags or whatever --- modules/report/api.js | 3 ++- modules/report/report.js | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/report/api.js b/modules/report/api.js index a49da3c..557fb66 100644 --- a/modules/report/api.js +++ b/modules/report/api.js @@ -13,7 +13,8 @@ var api = function(dbot) { 'channel': cName, 'user': user.id, 'time': new Date().getTime(), - 'message': message + 'message': message, + 'tags': message.match(/(#\w+)/g) }, function() {}); var channel = dbot.instance.connections[server].channels[cName]; diff --git a/modules/report/report.js b/modules/report/report.js index 703669f..8a39bc7 100644 --- a/modules/report/report.js +++ b/modules/report/report.js @@ -33,6 +33,8 @@ var report = function(dbot) { channel + "\u000f"; } + message.replace(/(#\w+)/g, '\u000312$1\u000f'); + _.each(message.match(/ @([\d\w*|-]+)/g), function(u) { u = u.substr(1); message = message.replace(u, colours['nicks'] + u + "\u000f");