diff --git a/modules/reddit/config.json b/modules/reddit/config.json index 3cdb249..20ad6ec 100644 --- a/modules/reddit/config.json +++ b/modules/reddit/config.json @@ -1,5 +1,8 @@ { "outputPrefix": "\u000312reddit\u000f", "dependencies": [ "link" ], - "dbType": "redis" + "dbType": "redis", + "colours": { + "Drugs": "\u00033" + } } diff --git a/modules/reddit/reddit.js b/modules/reddit/reddit.js index 977a1c7..0f7d78a 100644 --- a/modules/reddit/reddit.js +++ b/modules/reddit/reddit.js @@ -52,6 +52,9 @@ var reddit = function(dbot) { this.api.getNewPosts(feed.subreddit, checkTimes[channel.id][feed.subreddit], function(err, posts) { if(!err && posts.length > 0) { _.each(posts, function(post) { + if(_.has(this.colours, post.subreddit)) { + post.subreddit = this.colours[post.subreddit] + post.subreddit + "\u0003"; + } dbot.say(channel.server, channel.channel, dbot.t('about_new_post', { 'title': _.unescape(post.title.trim()), 'poster': post.author, diff --git a/modules/reddit/strings.json b/modules/reddit/strings.json index eb9179c..26fcd08 100644 --- a/modules/reddit/strings.json +++ b/modules/reddit/strings.json @@ -7,7 +7,7 @@ "it": "[{display_name} ha {subscribers} abonnati ({active} activo/i)]" }, "about_post": { - "en": "[{title}] [Post by {poster} in {subreddit} — Comments: {comments}, Score: {score} (\u00039▲{up}\u000f|\u000312{down}▼\u000f)] — {url}", + "en": "[{subreddit}][{title}] [Post by {poster} — Comments: {comments}, Score: {score} (\u00039▲{up}\u000f|\u000312{down}▼\u000f)] — {url}", "cy": "[Postio gan {poster} yn {subreddit} - Sylwadau: {comments}, Sgôr: {score} (\u00039]▲{up}\u000f|\u000312{down}▼\u000f)] — {url}", "de": "[Beitrag von {poster} in {subreddit} — Kommentare: {comments}, Bewertung: {score} (\u00039▲{up}\u000f|\u000312{down}▼\u000f)] — {url}", "fr": "[Message de {poster} dans {subreddit} — Commentaires: {comments}, Score: {score} (\u00039▲{up}\u000f|\u000312{down}▼\u000f)] — {url}",