From 4dd0e26ddc42edfd299ae4f1962e149f3f1f2d62 Mon Sep 17 00:00:00 2001 From: Daniel DiPaolo Date: Mon, 5 Jan 2004 01:04:03 +0000 Subject: [PATCH] Added configurable prefix to new news item announcements --- plugins/RSS.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/RSS.py b/plugins/RSS.py index 39e601251..b4e238859 100644 --- a/plugins/RSS.py +++ b/plugins/RSS.py @@ -76,7 +76,10 @@ class RSS(callbacks.Privmsg, configurable.Mixin): it announces new additions."""), ('headline-separator', configurable.SpaceSurroundedStrType, ' :: ', """Determines what string is used to seperate headlines in - feeds."""),] + feeds."""), + ('announce-news-prefix', configurable.StrType, 'New news item - ', + """Sets the prefix to be added (if any) to the new news item + announcements made to the channel."""),] ) globalConfigurables = configurable.Dictionary( [('wait-period', configurable.PositiveIntType, 1800, @@ -96,6 +99,7 @@ class RSS(callbacks.Privmsg, configurable.Mixin): for (channel, d) in feeds.iteritems(): sep = self.configurables.get('headline-separator', channel) bold = self.configurables.get('announce-news-bold', channel) + prefix = self.configurables.get('announce-news-prefix', channel) for name in d: if self.isCommand(name): url = self.getCommand(name).url @@ -117,7 +121,7 @@ class RSS(callbacks.Privmsg, configurable.Mixin): if bold: name = ircutils.bold(name) headlines = sep.join(newheadlines) - s = '%s: %s' % (name, headlines) + s = '%s%s: %s' % (prefix, name, headlines) irc.queueMsg(ircmsgs.privmsg(channel, s)) def getFeed(self, url):