From 2efcad2b29fc0873bec379fefde84eddd19f9665 Mon Sep 17 00:00:00 2001 From: Adam James Date: Sun, 30 Mar 2008 02:31:26 +0100 Subject: [PATCH] plugins/rss: add support for an '' target --- data/rbot/plugins/rss.rb | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/data/rbot/plugins/rss.rb b/data/rbot/plugins/rss.rb index ae2c0233..7395ea44 100644 --- a/data/rbot/plugins/rss.rb +++ b/data/rbot/plugins/rss.rb @@ -1038,11 +1038,20 @@ class RSSFeedsPlugin < Plugin return output if places.empty? - places.each { |loc| - output.to_s.each_line { |line| - @bot.say loc, line, :overlong => :truncate + # announce to all channels if watchlist includes the pseudo-target `' + if places.include?('') + @bot.server.channels.each { |chan| + output.to_s.each_line { |line| + @bot.say chan, line, :overlong => :truncate + } } - } + else + places.each { |loc| + output.to_s.each_line { |line| + @bot.say loc, line, :overlong => :truncate + } + } + end end def fetchRss(feed, m=nil, cache=true) -- 2.32.0.93.g670b81a890