summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/rbot29
1 files changed, 14 insertions, 15 deletions
diff --git a/bin/rbot b/bin/rbot
index 886f820a..a5c71492 100755
--- a/bin/rbot
+++ b/bin/rbot
@@ -22,22 +22,7 @@
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
$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.9"
-$opts = Hash.new
# print +message+ if debugging is enabled
def debug(message=nil)
@@ -45,6 +30,13 @@ def debug(message=nil)
#yield
end
+require 'etc'
+require 'getoptlong'
+require 'fileutils'
+
+$version="0.9.9"
+$opts = Hash.new
+
orig_opts = ARGV.dup
opts = GetoptLong.new(
@@ -67,6 +59,13 @@ if ($opts["trace"])
}
end
+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
+
if ($opts["version"])
puts "rbot #{$version}"