]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/bash.rb
autoop plugin: make the "add" command add arguments to existing settings
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / bash.rb
index 520346be4bc480f78575e5fe0df709234712a5d2..93d9c3f2af77f54844bb77b2edd7b79f3dbd4f79 100644 (file)
@@ -17,7 +17,6 @@
 # TODO allow selection of only quotes with vote > 0
 
 require 'rexml/document'
-require 'uri/common'
 
 class ::BashQuote
   attr_accessor :num, :text, :vote
@@ -56,7 +55,7 @@ class BashPlugin < Plugin
   end
 
   def search(m, params)
-    esc = URI.escape(params[:words].to_s)
+    esc = CGI.escape(params[:words].to_s)
     html = @bot.httputil.get("http://bash.org/?search=#{esc}")
     html_bash(m, :html => html)
   end