summaryrefslogtreecommitdiff
path: root/lib/rbot/httputil.rb
diff options
context:
space:
mode:
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}"