From afd4359a6d599c58c05a9f795bbe33cda7909a50 Mon Sep 17 00:00:00 2001 From: Matthias H Date: Sun, 11 Jan 2015 09:20:09 +0100 Subject: agent: remove proxy opt-out for plugins --- lib/rbot/core/utils/agent.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/rbot') diff --git a/lib/rbot/core/utils/agent.rb b/lib/rbot/core/utils/agent.rb index 8949a5c8..2140879d 100644 --- a/lib/rbot/core/utils/agent.rb +++ b/lib/rbot/core/utils/agent.rb @@ -52,13 +52,13 @@ class AgentFactory end # Returns a new, unique instance of Mechanize. - def create(noproxy=false) + def create agent = Mechanize.new agent.redirection_limit = @bot.config['agent.max_redir'] if not @bot.config['agent.ssl_verify'] agent.agent.http.verify_mode = OpenSSL::SSL::VERIFY_NONE end - if @bot.config['agent.proxy_use'] and not noproxy + if @bot.config['agent.proxy_use'] agent.set_proxy( @bot.config['agent.proxy_host'], @bot.config['agent.proxy_port'], -- cgit v1.2.3