X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=data%2Frbot%2Fplugins%2Fslashdot.rb;h=71411458e7300565cd1b069d240b1e39ade44953;hb=1c6b09968776c94b812317dfc4f91f09b5f0817c;hp=657cc0099b39c26f6c1ea263db3e2478b2c6de1b;hpb=55a13ec9c487860975f0fe491fbc1a7c2357c6ac;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/data/rbot/plugins/slashdot.rb b/data/rbot/plugins/slashdot.rb index 657cc009..71411458 100644 --- a/data/rbot/plugins/slashdot.rb +++ b/data/rbot/plugins/slashdot.rb @@ -23,8 +23,9 @@ class SlashdotPlugin < Plugin h = Hpricot(s[:text]) # If we have no title tag in a head tag, return as this is not # a /. page (it's probably a Slashdot RSS - return nil if h/"head/title".empty? - title = (h/"head/title").first.to_html.ircify_html + ht = h/"head/title" + return nil if ht.empty? + title = ht.first.to_html.ircify_html arts = (h/"div.article") return nil if arts.empty? if arts.length > 1