From 901d14ffa819d069730a64d99a90a1e282656119 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Mon, 17 Mar 2008 19:00:26 +0100 Subject: rss plugin: there are feeds with items without content --- data/rbot/plugins/rss.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/data/rbot/plugins/rss.rb b/data/rbot/plugins/rss.rb index 3fa38008..0cf8f129 100644 --- a/data/rbot/plugins/rss.rb +++ b/data/rbot/plugins/rss.rb @@ -977,7 +977,7 @@ class RSSFeedsPlugin < Plugin desc = item.content_encoded.ircify_html(desc_opt) elsif item.respond_to?(:description) && item.description desc = item.description.ircify_html(desc_opt) - else + elsif item.respond_to?(:content) && item.content if item.content.type == "html" desc = item.content.content.ircify_html(desc_opt) else @@ -986,6 +986,8 @@ class RSSFeedsPlugin < Plugin desc = desc.slice(0, desc_opt[:limit]) + "#{Reverse}...#{Reverse}" end end + else + desc = "(?)" end link = item.link.href rescue item.link.chomp rescue nil -- cgit v1.2.3