summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2006-08-25 07:40:21 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2006-08-25 07:40:21 +0000
commitc076cffc3616290badcc5e14aeb06cb291021a53 (patch)
treefaf0e5f4ea583cb9a964409a25434e876b07a898 /data
parenta803b58a4f914aa1f9b75ec23d4443880e75f206 (diff)
Fix misc RSS stuff: reverse publishing order of watched feeds, correct a config option description
Diffstat (limited to 'data')
-rw-r--r--data/rbot/plugins/rss.rb7
1 files 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)
}