From 3cdc485069b006174d383e735b54c4a9b7a24b3e Mon Sep 17 00:00:00 2001 From: Adam James Date: Tue, 4 Mar 2008 17:04:09 +0000 Subject: [PATCH] rss plugin: make displaying links from the text of a feed item configurable --- data/rbot/plugins/rss.rb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/data/rbot/plugins/rss.rb b/data/rbot/plugins/rss.rb index 5baf43ee..8e8cb29c 100644 --- a/data/rbot/plugins/rss.rb +++ b/data/rbot/plugins/rss.rb @@ -265,6 +265,10 @@ class RSSFeedsPlugin < Plugin :default => true, :desc => "Whether feed items for which the description was changed should be shown as new") + Config.register Config::BooleanValue.new('rss.show_links', + :default => true, + :desc => "Whether to display links from the text of a feed item.") + # We used to save the Mutex with the RssBlob, which was idiotic. And # since Mutexes dumped in one version might not be resotrable in another, # we need a few tricks to be able to restore data from other versions of Ruby @@ -879,10 +883,9 @@ class RSSFeedsPlugin < Plugin title = "#{Bold}#{base_title.ircify_html(tit_opt)}#{Bold}" end - desc_opt = { - :limit => @bot.config['rss.text_max'], - :a_href => :link_out - } + desc_opt = {} + desc_opt[:limit] = @bot.config['rss.text_max'] + desc_opt[:a_href] = :link_out if @bot.config['rss.show_links'] # We prefer content_encoded here as it tends to provide more html formatting # for use with ircify_html. -- 2.39.2