diff options
author | Tom Gilbert <tom@linuxbrit.co.uk> | 2006-01-26 10:48:12 +0000 |
---|---|---|
committer | Tom Gilbert <tom@linuxbrit.co.uk> | 2006-01-26 10:48:12 +0000 |
commit | 7881d147ffdd59fe67f1e48ebd13d645ea3a0292 (patch) | |
tree | 24716228499037d52090d8dcdf765b27e7815f00 | |
parent | 12b6b40826949033597c4f15494078ed94c0ce76 (diff) |
reinstate the use of the bot's httputil. As soon as I tried this at work I
realised we lost proxy support.
-rw-r--r-- | data/rbot/plugins/url.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/data/rbot/plugins/url.rb b/data/rbot/plugins/url.rb index d48639de..57b43a61 100644 --- a/data/rbot/plugins/url.rb +++ b/data/rbot/plugins/url.rb @@ -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 |