From 61eb0fd3f82dd1f26d3b9231cb463e6e65b81744 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sat, 6 Apr 2013 16:57:30 +0000 Subject: [PATCH] RSS: add supybot.plugins.RSS.announcementSeparator. --- plugins/RSS/config.py | 3 +++ plugins/RSS/plugin.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/RSS/config.py b/plugins/RSS/config.py index 2833ef4b7..dd8bc934e 100644 --- a/plugins/RSS/config.py +++ b/plugins/RSS/config.py @@ -60,6 +60,9 @@ conf.registerChannelValue(RSS, 'announcementPrefix', registry.StringWithSpaceOnRight(_('New news from '), _("""Determines what prefix is prepended (if any) to the new news item announcements made in the channel."""))) +conf.registerChannelValue(RSS, 'announcementSeparator', + registry.StringWithSpaceOnRight(_(': '), _("""Determines what + suffix is appended to the feed name in a news item."""))) conf.registerChannelValue(RSS, 'announce', registry.SpaceSeparatedSetOfStrings([], _("""Determines which RSS feeds should be announced in the channel; valid input is a list of strings diff --git a/plugins/RSS/plugin.py b/plugins/RSS/plugin.py index 6d0a6d2af..065cb26fd 100644 --- a/plugins/RSS/plugin.py +++ b/plugins/RSS/plugin.py @@ -214,7 +214,8 @@ class RSS(callbacks.Plugin): bold = self.registryValue('bold', channel) sep = self.registryValue('headlineSeparator', channel) prefix = self.registryValue('announcementPrefix', channel) - pre = format('%s%s: ', prefix, name) + suffix = self.registryValue('announcementSeparator', channel) + pre = format('%s%s%s', prefix, name, suffix) if bold: pre = ircutils.bold(pre) sep = ircutils.bold(sep)