summaryrefslogtreecommitdiff
path: root/lib/rbot/httputil.rb
diff options
context:
space:
mode:
authorTom Gilbert <tom@linuxbrit.co.uk>2005-08-02 15:28:36 +0000
committerTom Gilbert <tom@linuxbrit.co.uk>2005-08-02 15:28:36 +0000
commit5940baa7fb81196925d692d4e4fe6d6cab73d1ed (patch)
tree787348f8d4739d0c46b94a60494ddafdf5929618 /lib/rbot/httputil.rb
parentca1105be02e1baf867eaeb2c56049f87d8a9ecd3 (diff)
* Fixed the new http.proxy* settings, they work!
* Fixed a bug with auth-checking for the config module * misc tweaks
Diffstat (limited to 'lib/rbot/httputil.rb')
-rw-r--r--lib/rbot/httputil.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/rbot/httputil.rb b/lib/rbot/httputil.rb
index c6f51d8e..e234dc10 100644
--- a/lib/rbot/httputil.rb
+++ b/lib/rbot/httputil.rb
@@ -44,7 +44,7 @@ class HttpUtil
list = [uri.host]
begin
- list.push Resolv.getaddresses(uri.host)
+ list.concat Resolv.getaddresses(uri.host)
rescue StandardError => err
puts "warning: couldn't resolve host uri.host"
end
@@ -90,10 +90,10 @@ class HttpUtil
if @bot.config["http.use_proxy"]
if (ENV['http_proxy'])
- proxy = URI.parse ENV['http_proxy']
+ proxy = URI.parse ENV['http_proxy'] rescue nil
end
if (@bot.config["http.proxy_uri"])
- proxy = URI.parse ENV['http_proxy_uri']
+ proxy = URI.parse @bot.config["http.proxy_uri"] rescue nil
end
if proxy
debug "proxy is set to #{proxy.uri}"