From c290b64285e8e543e2a7cba60cd8239a3ef8ae35 Mon Sep 17 00:00:00 2001 From: reality Date: Thu, 29 Jan 2015 21:41:01 +0000 Subject: [PATCH] full redir --- modules/report/api.js | 6 ++++++ modules/report/config.json | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/modules/report/api.js b/modules/report/api.js index 5e5733a..6e37b9d 100644 --- a/modules/report/api.js +++ b/modules/report/api.js @@ -10,6 +10,12 @@ var api = function(dbot) { _.each(message.match(/(#\w+)/g), function(match) { tags.push(match.toLowerCase()); }); + + if(_.has(this.config.full_redirs, cName)) { + message = '(redirect from ' + cName + ') ' + message; + cName = this.config.full_redirs[cName]; + } + this.db.save('notifies', id, { 'id': id, 'server': server, diff --git a/modules/report/config.json b/modules/report/config.json index bbcef47..e857625 100644 --- a/modules/report/config.json +++ b/modules/report/config.json @@ -20,8 +20,11 @@ "chan_redirs": { "#chan": "#chan-notify" }, - "host_lookup": [ + "full_redirs": { + "#chan": "#chan-fullnotify" + }, + "host_lookup": { "#chan" - ], + }, "noMissingChans": [] }