mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
RSS: Add supybot.plugins.RSS.notice. Closes GH-1151.
This commit is contained in:
parent
1002ec5d30
commit
4498548cb3
@ -90,6 +90,9 @@ conf.registerGlobalValue(RSS, 'sortFeedItems',
|
||||
FeedItemSortOrder('asInFeed', _("""Determines whether feed items should be
|
||||
sorted by their publication/update timestamp or kept in the same order as
|
||||
they appear in a feed.""")))
|
||||
conf.registerChannelValue(RSS, 'notice',
|
||||
registry.Boolean(False, _("""Determines whether announces will be sent
|
||||
as notices instead of privmsgs.""")))
|
||||
|
||||
####################
|
||||
# Headlines filtering
|
||||
|
@ -404,7 +404,11 @@ class RSS(callbacks.Plugin):
|
||||
def announce_entry(self, irc, channel, feed, entry):
|
||||
if self.should_send_entry(channel, entry):
|
||||
s = self.format_entry(channel, feed, entry, True)
|
||||
irc.queueMsg(ircmsgs.privmsg(channel, s))
|
||||
if self.registryValue('notice', channel):
|
||||
m = ircmsgs.notice(channel, s)
|
||||
else:
|
||||
m = ircmsgs.privmsg(channel, s)
|
||||
irc.queueMsg(m)
|
||||
|
||||
|
||||
##########
|
||||
|
Loading…
Reference in New Issue
Block a user