RSS: add supybot.plugins.RSS.announcementSeparator.

This commit is contained in:
Valentin Lorentz 2013-04-06 16:57:30 +00:00
parent f4bf62ab6b
commit 61eb0fd3f8
2 changed files with 5 additions and 1 deletions

View File

@ -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

View File

@ -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)