summaryrefslogtreecommitdiff
path: root/data/rbot
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-03-17 19:00:26 +0100
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-03-17 19:12:44 +0100
commit901d14ffa819d069730a64d99a90a1e282656119 (patch)
tree80dfd235ede1c591e2876f9adad9ca36bb0b6159 /data/rbot
parentbebde5f254e40c7cce6c068a17e7f2c575611db0 (diff)
rss plugin: there are feeds with items without content
Diffstat (limited to 'data/rbot')
-rw-r--r--data/rbot/plugins/rss.rb4
1 files changed, 3 insertions, 1 deletions
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