X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=data%2Frbot%2Fplugins%2Fdict.rb;h=edadd3c7cbb877a08ad104af2d8ff66280c46006;hb=21947daae8f66141d3c53ce2f58eab60701d52bf;hp=5176591ae7d84d4f04837146c247dffd7b708c99;hpb=9e3ef30611444621016d76fa145a5e4ceb3437ee;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/data/rbot/plugins/dict.rb b/data/rbot/plugins/dict.rb index 5176591a..edadd3c7 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] !~ /