The compat19 code touches the monitor mixins which are used by the
logger which is started as soon as ircbot.rb is loaded. To make sure the
logger uses the compat code we must load compat19 before ircbot.
$:.unshift defaultlib
end
end
-
+
begin
+ # ruby 1.9 specific fixes
+ unless RUBY_VERSION < '1.9'
+ require 'rbot/compat19'
+ end
+
require 'rbot/ircbot'
rescue LoadError => e
puts "Error: couldn't find the rbot/ircbot module (or one of its dependencies)\n"
exit 2
end
-# ruby 1.9 specific fixes
-unless RUBY_VERSION < '1.9'
- require 'rbot/compat19'
-end
-
if ($opts["version"])
puts "rbot #{$version}"
exit 0