From: Giuseppe Bilotta Date: Fri, 25 Aug 2006 07:40:21 +0000 (+0000) Subject: Fix misc RSS stuff: reverse publishing order of watched feeds, correct a config optio... X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=c076cffc3616290badcc5e14aeb06cb291021a53;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git Fix misc RSS stuff: reverse publishing order of watched feeds, correct a config option description --- 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) }