summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/rbot/core/utils/httputil.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/rbot/core/utils/httputil.rb b/lib/rbot/core/utils/httputil.rb
index 42b7fdb8..7566aca4 100644
--- a/lib/rbot/core/utils/httputil.rb
+++ b/lib/rbot/core/utils/httputil.rb
@@ -3,7 +3,13 @@ module Utils
require 'resolv'
require 'net/http'
-require 'net/https'
+begin
+ require 'net/https'
+rescue LoadError => e
+ error "Coudln't load 'net/https': #{e.inspect}"
+ error "Secured HTTP connections will fail"
+end
+
Net::HTTP.version_1_2
# class for making http requests easier (mainly for plugins to use)