]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/dict.rb
plugins: use CGI.escape instead of URI.escape where appropriate, remove some checks...
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / dict.rb
index ef162215ef4ee5044363ba24ce4b11139d775832..30cfc5feefb9eefba7259c667b7e6619a26d6a8e 100644 (file)
@@ -54,7 +54,7 @@ class DictPlugin < Plugin
     justcheck = params[:justcheck]\r
 \r
     word = params[:word].downcase\r
-    url = @dmwapurl % URI.escape(word)\r
+    url = @dmwapurl % CGI.escape(word)\r
     xml = nil\r
     info = @bot.httputil.get_response(url) rescue nil\r
     xml = info.body if info\r
@@ -106,7 +106,7 @@ class DictPlugin < Plugin
 \r
     word = params[:word].join\r
     [word, word + "_1"].each { |check|\r
-      url = @oxurl % URI.escape(check)\r
+      url = @oxurl % CGI.escape(check)\r
       h = @bot.httputil.head(url, :max_redir => 5)\r
       if h\r
         m.reply("#{word} found: #{url}") unless justcheck\r
@@ -126,7 +126,7 @@ class DictPlugin < Plugin
     justcheck = params[:justcheck]\r
 \r
     word = params[:word].to_s.downcase\r
-    url = @chambersurl % URI.escape(word)\r
+    url = @chambersurl % CGI.escape(word)\r
     xml = nil\r
     info = @bot.httputil.get_response(url) rescue nil\r
     xml = info.body if info\r