summaryrefslogtreecommitdiff
path: root/bin/rbot
diff options
context:
space:
mode:
authorTom Gilbert <tom@linuxbrit.co.uk>2005-07-27 16:49:34 +0000
committerTom Gilbert <tom@linuxbrit.co.uk>2005-07-27 16:49:34 +0000
commitaabe8920ae1e120587c8e27a62827d28afdc04e5 (patch)
treec4405c0e4aec14e62e0aeea101523261a9951535 /bin/rbot
parent3923613eeb0cb91abfe3f01238aeddec07573fec (diff)
rework various modules to use the installed directories
Diffstat (limited to 'bin/rbot')
-rwxr-xr-xbin/rbot18
1 files changed, 5 insertions, 13 deletions
diff --git a/bin/rbot b/bin/rbot
index 9b0de677..c46b9571 100755
--- a/bin/rbot
+++ b/bin/rbot
@@ -26,6 +26,8 @@ $VERBOSE=true
require 'etc'
require 'getoptlong'
require 'rbot/ircbot'
+require 'fileutils'
+require 'rbconfig'
$debug = true
$version="0.9.8"
@@ -47,22 +49,12 @@ opts.each {|opt, arg|
$opts[opt.sub(/^-+/, "")] = arg
}
-botclass = ARGV.shift
-user = Etc.getlogin
-botclass = "/home/#{user}/.rbot" unless(botclass);
-
-unless FileTest.directory? botclass
- # TODO copy in samples/templates from install directory
- puts "no #{botclass} directory found, creating from templates.."
- # copy DATA/rbot/templates to botclass
-
-end
-
-if(bot = Irc::IrcBot.new(botclass))
+if(bot = Irc::IrcBot.new(ARGV.shift))
if($opts["help"])
+ # query bot help from the commandline
puts bot.help($opts["help"])
else
- # run the bot
+ # just run the bot
bot.mainloop
end
end