]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
Fix misc RSS stuff: reverse publishing order of watched feeds, correct a config optio...
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Fri, 25 Aug 2006 07:40:21 +0000 (07:40 +0000)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Fri, 25 Aug 2006 07:40:21 +0000 (07:40 +0000)
data/rbot/plugins/rss.rb

index 03bb0b42038e2c0dbb27a09a77c99a82a60b1d45..e276d0a44bc3343d208e1a19f8e34e6b37e28323 100644 (file)
@@ -70,6 +70,8 @@ class ::RssBlob
     if watched_by?(who)\r
       return nil\r
     end\r
+    # TODO FIXME? should we just store watchers as Strings instead?\r
+    # This should then be @watchers << who.downcase\r
     @watchers << who\r
     return who\r
   end\r
@@ -106,7 +108,7 @@ class RSSFeedsPlugin < Plugin
 \r
   BotConfig.register BotConfigIntegerValue.new('rss.thread_sleep',\r
     :default => 300, :validate => Proc.new{|v| v > 30},\r
-    :desc => "How many characters to use of a RSS item text")\r
+    :desc => "How many seconds to sleep before checking RSS feeds again")\r
 \r
   @@watchThreads = Hash.new\r
   @@mutex = Mutex.new\r
@@ -418,7 +420,8 @@ class RSSFeedsPlugin < Plugin
               }\r
               if dispItems.length > 0\r
                 debug "Found #{dispItems.length} new items in #{feed}"\r
-                dispItems.each { |item|\r
+                # When displaying watched feeds, publish them from older to newer\r
+                dispItems.reverse.each { |item|\r
                   @@mutex.synchronize {\r
                     printFormattedRss(feed, item)\r
                   }\r