diff options
Diffstat (limited to 'data')
-rw-r--r-- | data/rbot/plugins/slashdot.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/data/rbot/plugins/slashdot.rb b/data/rbot/plugins/slashdot.rb index b02a5a25..657cc009 100644 --- a/data/rbot/plugins/slashdot.rb +++ b/data/rbot/plugins/slashdot.rb @@ -21,8 +21,12 @@ class SlashdotPlugin < Plugin loc = Utils.check_location(s, /slashdot\.org/) return nil unless loc 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 arts = (h/"div.article") + return nil if arts.empty? if arts.length > 1 tits = [] arts.each { |el| |