From c076cffc3616290badcc5e14aeb06cb291021a53 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Fri, 25 Aug 2006 07:40:21 +0000 Subject: [PATCH] Fix misc RSS stuff: reverse publishing order of watched feeds, correct a config option description --- data/rbot/plugins/rss.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/data/rbot/plugins/rss.rb b/data/rbot/plugins/rss.rb index 03bb0b42..e276d0a4 100644 --- a/data/rbot/plugins/rss.rb +++ b/data/rbot/plugins/rss.rb @@ -70,6 +70,8 @@ class ::RssBlob if watched_by?(who) return nil end + # TODO FIXME? should we just store watchers as Strings instead? + # This should then be @watchers << who.downcase @watchers << who return who end @@ -106,7 +108,7 @@ class RSSFeedsPlugin < Plugin BotConfig.register BotConfigIntegerValue.new('rss.thread_sleep', :default => 300, :validate => Proc.new{|v| v > 30}, - :desc => "How many characters to use of a RSS item text") + :desc => "How many seconds to sleep before checking RSS feeds again") @@watchThreads = Hash.new @@mutex = Mutex.new @@ -418,7 +420,8 @@ class RSSFeedsPlugin < Plugin } if dispItems.length > 0 debug "Found #{dispItems.length} new items in #{feed}" - dispItems.each { |item| + # When displaying watched feeds, publish them from older to newer + dispItems.reverse.each { |item| @@mutex.synchronize { printFormattedRss(feed, item) } -- 2.32.0.93.g670b81a890