summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorCasey Link <unnamedrambler@gmail.com>2008-06-23 18:00:08 -0400
committerdmitry kim <jason@nichego.net>2008-06-24 00:05:51 +0400
commit26d2e36ff08de4e3bbf510616d4c8dac6da9d6d0 (patch)
tree0f9ec145b0b1ba0824ccf2e4cc383505ddadc0d2 /data
parent3b83d8870cc04a2b0eff4250dd8deef9ea1d697b (diff)
dict.rb plugin: fixes the oxford parser so it doesn't spit out a bunch of extra crap
before: [13:45:29] <insanity> fruitful: adjective 1 producing much fruit; fertile. 2 producing good results; productive. DERIVATIVES fruitfully adverb fruitfulness noun. Perform another search of the Compact Oxford English Dictionary About this dictionary The Compact Oxford English Dictionary of Current English contains 145,000 words, phrases, and definitions. Find out more about Oxford's range of English dictionaries Sign up for the AskOxford Word of... after: [13:58:36] <VanGogh> fruitful: adjective 1 producing much fruit; fertile. 2 producing good results; productive. DERIVATIVES fruitfully adverb fruitfulness noun.
Diffstat (limited to 'data')
-rw-r--r--data/rbot/plugins/dict.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/data/rbot/plugins/dict.rb b/data/rbot/plugins/dict.rb
index edadd3c7..098d4ebb 100644
--- a/data/rbot/plugins/dict.rb
+++ b/data/rbot/plugins/dict.rb
@@ -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