X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=bin%2Frbot;h=bbe2c9ea5b43bf69c15a3bd2ebcf30d957acb299;hb=119892c09183cf09ef5247664ec3d9daa7b7a042;hp=38cf7e49ef9e58642fce3f905bed985017146dcb;hpb=adb719c8e886fead559802bfce868ddfce001a80;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/bin/rbot b/bin/rbot index 38cf7e49..bbe2c9ea 100755 --- a/bin/rbot +++ b/bin/rbot @@ -26,25 +26,10 @@ $VERBOSE=true require 'etc' require 'getoptlong' require 'fileutils' -require 'rbconfig' -begin - require 'rbot/ircbot' -rescue LoadError => e - puts "Error: couldn't find the rbot/ircbot module for loading\n - did you install rbot using install.rb?" - exit 2 -end - -$debug = false -$version="0.9.8" +$version="0.9.9" $opts = Hash.new -# print +message+ if debugging is enabled -def debug(message=nil) - print "DEBUG: #{message}\n" if($debug && message) - #yield -end - orig_opts = ARGV.dup opts = GetoptLong.new( @@ -54,6 +39,7 @@ opts = GetoptLong.new( ["--version", "-v", GetoptLong::NO_ARGUMENT] ) +$debug = false opts.each {|opt, arg| $debug = true if(opt == "--debug") $opts[opt.sub(/^-+/, "")] = arg @@ -67,6 +53,13 @@ if ($opts["trace"]) } end +begin + require 'rbot/ircbot' +rescue LoadError => e + puts "Error: couldn't find the rbot/ircbot module (or one of its dependencies)\n - did you install rbot using setup.rb?" + puts e + exit 2 +end if ($opts["version"]) puts "rbot #{$version}"