summaryrefslogtreecommitdiff
path: root/data/rbot/plugins
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-09-18 12:06:52 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-09-18 12:06:52 +0000
commit04a1aab1c40c7b2754940998e2e6ec290fc19e0d (patch)
tree51d8604298c78d75ec4eaeec565e44fed8169720 /data/rbot/plugins
parentb300dc765bdc74f77705a92092d5a36ec234b187 (diff)
dict plugin: oxford isn't british only anymore
Diffstat (limited to 'data/rbot/plugins')
-rw-r--r--data/rbot/plugins/dict.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/data/rbot/plugins/dict.rb b/data/rbot/plugins/dict.rb
index be7923a2..245b48a4 100644
--- a/data/rbot/plugins/dict.rb
+++ b/data/rbot/plugins/dict.rb
@@ -108,6 +108,9 @@ class DictPlugin < Plugin
word = params[:word].join
[word, word + "_1"].each { |check|
url = @oxurl % CGI.escape(check)
+ if params[:british]
+ url << "?view=uk"
+ end
h = @bot.httputil.head(url, :max_redir => 5)
if h
m.reply("#{word} found: #{url}") unless justcheck
@@ -119,7 +122,7 @@ class DictPlugin < Plugin
end
def is_british?(word)
- return oxford(nil, :word => word, :justcheck => true)
+ return oxford(nil, :word => word, :justcheck => true, :british => true)
end