]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/dict.rb
figlet plugin: check paths and fonts using Utils.safe_exec
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / dict.rb
index edadd3c7cbb877a08ad104af2d8ff66280c46006..098d4ebb639425a5797c6dcd174a60ee4a09e0a7 100644 (file)
@@ -140,9 +140,9 @@ class DictPlugin < Plugin
         url << "?view=uk"
       end
       h = @bot.httputil.get(url, :max_redir => 5)
-      if h and h.match(%r!<h2>#{word}(?:<sup>1</sup>)?</h2>!)
+      if h and h.match(/<h2>#{word}<\/h2>(.*)Perform/m)
         m.reply("#{word} : #{url}") unless justcheck
-        defn = $'
+        defn = $1
         m.reply("#{Bold}%s#{Bold}: %s" % [word, defn.ircify_html(:nbsp => :space)], :overlong => :truncate)
         return true
       end