]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
reinstate the use of the bot's httputil. As soon as I tried this at work I
authorTom Gilbert <tom@linuxbrit.co.uk>
Thu, 26 Jan 2006 10:48:12 +0000 (10:48 +0000)
committerTom Gilbert <tom@linuxbrit.co.uk>
Thu, 26 Jan 2006 10:48:12 +0000 (10:48 +0000)
realised we lost proxy support.

data/rbot/plugins/url.rb

index d48639deb6f8eec9cfde31697d2f1747064c8bf4..57b43a6157d26a8b0f37b5e5f961ef1982951fb7 100644 (file)
@@ -37,7 +37,8 @@ class UrlPlugin < Plugin
     return if url.scheme !~ /https?/
     
     puts "+ connecting to #{url.host}:#{url.port}"
-    title = Net::HTTP.start(url.host, url.port) do |http|
+    http = @bot.httputil.get_proxy(url)
+    title = http.start do |http|
       url.path = '/' if url.path == ''
       head = http.request_head(url.path)
       case head