]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - bin/rbot
move rbot into lib - still rearranging for packaging/installation
[user/henk/code/ruby/rbot.git] / bin / rbot
index 6f08fe5725bb3aa34068d1cc0b29a2709e119e1b..9b0de6775454d61f46fded6737b3a79cebb17449 100755 (executable)
--- a/bin/rbot
+++ b/bin/rbot
@@ -23,6 +23,7 @@
 
 $VERBOSE=true
 
+require 'etc'
 require 'getoptlong'
 require 'rbot/ircbot'
 
@@ -47,10 +48,14 @@ opts.each {|opt, arg|
 }
 
 botclass = ARGV.shift
-botclass = "rbotconf" unless(botclass);
+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))