From b14aff9aee87df83c2aab47c92b58cc7bf74432e Mon Sep 17 00:00:00 2001 From: Dmitry Kim Date: Mon, 2 Apr 2007 11:02:03 +0000 Subject: * (rss) bypass http cache when handling 'show' command --- data/rbot/plugins/rss.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'data/rbot') 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 -- cgit v1.2.3