summaryrefslogtreecommitdiff
path: root/data/rbot
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2009-06-02 00:41:56 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2009-06-02 00:41:56 +0200
commit105e41c59bed327e1861017112899c6bc7a4f811 (patch)
tree5fd845f84e63c439ec7128e2ab2f049d4ac12c3b /data/rbot
parentc391125e75fe205056da8e7e0d31e988be37199a (diff)
rss plugin: categories fix
Don't break when the feed doesn't define categories.
Diffstat (limited to 'data/rbot')
-rw-r--r--data/rbot/plugins/rss.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/data/rbot/plugins/rss.rb b/data/rbot/plugins/rss.rb
index fc3082e8..cabc8272 100644
--- a/data/rbot/plugins/rss.rb
+++ b/data/rbot/plugins/rss.rb
@@ -175,6 +175,7 @@ module ::RSS
}.each { |name, chain| def_bang name, chain }
def categories!
+ return nil unless self.respond_to? :categories
cats = categories.map do |c|
blank2nil { c.content rescue c rescue nil }
end.compact