Skip to content

Commit

Permalink
RSS: add supybot.plugins.RSS.announcementSeparator.
Browse files Browse the repository at this point in the history
  • Loading branch information
progval committed Apr 6, 2013
1 parent f4bf62a commit 61eb0fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions plugins/RSS/config.py
Expand Up @@ -60,6 +60,9 @@ class FeedItemSortOrder(registry.OnlySomeStrings):
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
Expand Down
3 changes: 2 additions & 1 deletion plugins/RSS/plugin.py
Expand Up @@ -214,7 +214,8 @@ def filter_blacklist(headline):
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)
Expand Down

0 comments on commit 61eb0fd

Please sign in to comment.