diff options
author | Dmitry Kim <dmitry point kim at gmail point com> | 2007-04-02 11:02:03 +0000 |
---|---|---|
committer | Dmitry Kim <dmitry point kim at gmail point com> | 2007-04-02 11:02:03 +0000 |
commit | b14aff9aee87df83c2aab47c92b58cc7bf74432e (patch) | |
tree | 3b3f16c7d2f3113330ec2af8147f416d90f7b657 /data/rbot/plugins | |
parent | 54880f0f16d148cc0433492d46ff96104a904a22 (diff) |
* (rss) bypass http cache when handling 'show' command
Diffstat (limited to 'data/rbot/plugins')
-rw-r--r-- | data/rbot/plugins/rss.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/data/rbot/plugins/rss.rb b/data/rbot/plugins/rss.rb index 5873c496..a067cbba 100644 --- a/data/rbot/plugins/rss.rb +++ b/data/rbot/plugins/rss.rb @@ -397,7 +397,7 @@ class RSSFeedsPlugin < Plugin m.reply "lemme fetch it..."
title = items = nil
- fetched = fetchRss(feed, m)
+ fetched = fetchRss(feed, m, false)
return unless fetched or feed.xml
if not fetched and feed.items
m.reply "using old data"
@@ -772,12 +772,13 @@ class RSSFeedsPlugin < Plugin }
end
- def fetchRss(feed, m=nil)
+ def fetchRss(feed, m=nil, cache=true)
begin
# Use 60 sec timeout, cause the default is too low
xml = @bot.httputil.get(feed.url,
:read_timeout => 60,
- :open_timeout => 60)
+ :open_timeout => 60,
+ :cache => cache)
rescue URI::InvalidURIError, URI::BadURIError => e
report_problem("invalid rss feed #{feed.url}", e, m)
return nil
|