diff options
Diffstat (limited to 'lib/rbot')
-rw-r--r-- | lib/rbot/httputil.rb (renamed from lib/rbot/core/utils/httputil.rb) | 17 | ||||
-rw-r--r-- | lib/rbot/ircbot.rb | 3 |
2 files changed, 3 insertions, 17 deletions
diff --git a/lib/rbot/core/utils/httputil.rb b/lib/rbot/httputil.rb index fb275547..75b5b80b 100644 --- a/lib/rbot/core/utils/httputil.rb +++ b/lib/rbot/httputil.rb @@ -726,20 +726,3 @@ class HttpUtil end end end - -class HttpUtilPlugin < CoreBotModule - def initialize(*a) - super(*a) - debug 'initializing httputil' - @bot.httputil = Irc::Utils::HttpUtil.new(@bot) - end - - def cleanup - debug 'shutting down httputil' - @bot.httputil.cleanup - @bot.httputil = nil - super - end -end - -HttpUtilPlugin.new diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb index ddbc6eb6..3c508229 100644 --- a/lib/rbot/ircbot.rb +++ b/lib/rbot/ircbot.rb @@ -50,6 +50,7 @@ require 'rbot/registry' require 'rbot/plugins' require 'rbot/message' require 'rbot/language' +require 'rbot/httputil' module Irc @@ -471,6 +472,7 @@ class Bot @plugins = nil @lang = Language.new(self, @config['core.language']) + @httputil = Utils::HttpUtil.new(self) begin @auth = Auth::manager @@ -1236,6 +1238,7 @@ class Bot debug "\tignoring cleanup error: #{$!}" end end + @httputil.cleanup # debug "\tstopping timers ..." # @timer.stop # debug "Closing registries" |