]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
When adding a feed watcher, let it fire instantly so that it can do the initial rss...
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Tue, 30 Jan 2007 15:53:20 +0000 (15:53 +0000)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Tue, 30 Jan 2007 15:53:20 +0000 (15:53 +0000)
data/rbot/plugins/rss.rb

index b5a44bd7788bb6cbfe10f711aad8e6b36e67786c..13689bf14efdfeb63136de3a437ecbd64a71a6a3 100644 (file)
@@ -388,7 +388,7 @@ class RSSFeedsPlugin < Plugin
     status[:oldItems] = []\r
     status[:firstRun] = true\r
     status[:failures] = 0\r
-    @watch[feed.handle] = @bot.timer.add(@bot.config['rss.thread_sleep'], status) {\r
+    @watch[feed.handle] = @bot.timer.add(0, status) {\r
       debug "watcher for #{feed} started"\r
       oldItems = status[:oldItems]\r
       firstRun = status[:firstRun]\r
@@ -437,6 +437,7 @@ class RSSFeedsPlugin < Plugin
       debug "watcher for #{feed} going to sleep #{seconds} seconds.."\r
       @bot.timer.reschedule(@watch[feed.handle], seconds)\r
     }\r
+    debug "watcher for #{feed} added"\r
   end\r
 \r
   def printFormattedRss(feed, item, opts=nil)\r