X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=data%2Frbot%2Fplugins%2Fdict.rb;h=c9bfabafadef5fb75491d6590f492d7ec8caa48a;hb=052217de30c59206d7025b582d4604557a747470;hp=5176591ae7d84d4f04837146c247dffd7b708c99;hpb=539c526cf8ec0b4b07d84541cd3ce27d08ac946b;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/data/rbot/plugins/dict.rb b/data/rbot/plugins/dict.rb index 5176591a..c9bfabaf 100644 --- a/data/rbot/plugins/dict.rb +++ b/data/rbot/plugins/dict.rb @@ -31,14 +31,37 @@ class DictPlugin < Plugin :default => 0, :desc => "When set to n > 0, the bot will return the first paragraph from the first n dictionary hits") + def demauro_filter(s) + # check if it's a page we can handle + loc = Utils.check_location(s, @dmurlrx) + # the location might be not good, but we might still be able to handle the + # page + if !loc and s[:text] !~ /