From f035093afcd72050d23620f86cb43380164044ce Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Tue, 30 Jan 2007 15:53:20 +0000 Subject: When adding a feed watcher, let it fire instantly so that it can do the initial rss retrieval --- data/rbot/plugins/rss.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'data/rbot') diff --git a/data/rbot/plugins/rss.rb b/data/rbot/plugins/rss.rb index b5a44bd7..13689bf1 100644 --- a/data/rbot/plugins/rss.rb +++ b/data/rbot/plugins/rss.rb @@ -388,7 +388,7 @@ class RSSFeedsPlugin < Plugin status[:oldItems] = [] status[:firstRun] = true status[:failures] = 0 - @watch[feed.handle] = @bot.timer.add(@bot.config['rss.thread_sleep'], status) { + @watch[feed.handle] = @bot.timer.add(0, status) { debug "watcher for #{feed} started" oldItems = status[:oldItems] firstRun = status[:firstRun] @@ -437,6 +437,7 @@ class RSSFeedsPlugin < Plugin debug "watcher for #{feed} going to sleep #{seconds} seconds.." @bot.timer.reschedule(@watch[feed.handle], seconds) } + debug "watcher for #{feed} added" end def printFormattedRss(feed, item, opts=nil) -- cgit v1.2.3