From 04a1aab1c40c7b2754940998e2e6ec290fc19e0d Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Tue, 18 Sep 2007 12:06:52 +0000 Subject: dict plugin: oxford isn't british only anymore --- data/rbot/plugins/dict.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'data/rbot') 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 -- cgit v1.2.3