]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/slashdot.rb
fish plugin: multiline answers are now properly detected
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / slashdot.rb
index 30f58dc9ee31370a1d0ce5514a24adf8cb2f90cd..fa1338bdcc8d6f75af330e9bbe31e309e8bf12b1 100644 (file)
@@ -12,7 +12,7 @@ class SlashdotPlugin < Plugin
    search = params[:search].to_s
 
     begin
-      xml = @bot.httputil.get(URI.parse("http://slashdot.org/search.pl?content_type=rss&query=#{URI.escape(search)}"))
+      xml = @bot.httputil.get("http://slashdot.org/search.pl?content_type=rss&query=#{URI.escape(search)}")
     rescue URI::InvalidURIError, URI::BadURIError => e
       m.reply "illegal search string #{search}"
       return
@@ -53,7 +53,7 @@ class SlashdotPlugin < Plugin
     debug params.inspect
     max = params[:limit].to_i
     debug "max is #{max}"
-    xml = @bot.httputil.get(URI.parse("http://slashdot.org/slashdot.xml"))
+    xml = @bot.httputil.get('http://slashdot.org/slashdot.xml')
     unless xml
       m.reply "slashdot news parse failed"
       return