diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2010-11-18 16:08:19 +0100 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2010-11-18 16:08:19 +0100 |
commit | bd045414cfa2f2332ae766ae80c9e7c225bfa971 (patch) | |
tree | 90ce0a30be6d9fee8c763fcf7cc1bf03cc661deb /data/rbot/plugins | |
parent | b4e07b8fb4f1c79cc8c6a09fcb18bb3d4e25ea98 (diff) |
rss plugin: don't fail when feed.last_success is nil
The first_run check comparing the time delta from last success failed
when feed.last_success was nil. Prevent this from happening by checking
if we are on the first run before the rest of the checks.
Diffstat (limited to 'data/rbot/plugins')
-rw-r--r-- | data/rbot/plugins/rss.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/data/rbot/plugins/rss.rb b/data/rbot/plugins/rss.rb index ea8b096c..3b09930a 100644 --- a/data/rbot/plugins/rss.rb +++ b/data/rbot/plugins/rss.rb @@ -928,7 +928,7 @@ class RSSFeedsPlugin < Plugin debug "fetching #{feed}" first_run = !feed.last_success - if (@bot.config['rss.announce_timeout'] > 0 && + if (!first_run && @bot.config['rss.announce_timeout'] > 0 && (Time.now - feed.last_success > @bot.config['rss.announce_timeout'])) debug "#{feed} wasn't polled for too long, supressing output" first_run = true |