]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - bin/rbot
bunch of changes.
[user/henk/code/ruby/rbot.git] / bin / rbot
index 38cf7e49ef9e58642fce3f905bed985017146dcb..bbe2c9ea5b43bf69c15a3bd2ebcf30d957acb299 100755 (executable)
--- 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}"