-# vim: set sw=2 et:\r
+#-- vim:sw=2:et\r
+#++\r
#\r
-# dict plugin: provides a link to the definition of a word in one of the supported\r
+# :title: Dictionary lookup plugin for rbot\r
+#\r
+# Author:: Giuseppe "Oblomov" Bilotta <giuseppe.bilotta@gmail.com>\r
+# Copyright:: (C) 2006-2007 Giuseppe Bilotta\r
+# License:: GPL v2\r
+#\r
+# Provides a link to the definition of a word in one of the supported\r
# dictionaries. Currently available are\r
# * the Oxford dictionary for (British) English\r
# * the De Mauro/Paravia dictionary for Italian\r
# * the Chambers dictionary for English (accepts both US and UK)\r
#\r
-# other plugins can use this one to check if a given word is valid in italian\r
+# Other plugins can use this one to check if a given word is valid in italian\r
# or english by using the is_italian?/is_british?/is_english? methods\r
#\r
-# Author: Giuseppe "Oblomov" Bilotta <giuseppe.bilotta@gmail.com>\r
-#\r
# TODO: cache results and reuse them if get_cached returns a cache copy\r
\r
require 'uri'\r
\r
return unless first_pars > 0\r
\r
- Utils.get_first_pars urls, first_pars, :http_util => @bot.httputil, :message => m\r
+ Utils.get_first_pars urls, first_pars, :http_util => @bot.httputil, :message => m,\r
+ :strip => /^\S+\s+-\s+/\r
\r
end\r
\r
return false if justcheck\r
m.reply "Nothing found for #{word}, but see #{url} for possible suggestions"\r
else\r
- return false if justcheck\r
+ return true if justcheck\r
m.reply "#{word}: #{url}"\r
end\r
end\r