]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
Fix the location for the bot log: put it in the botclass directory, and remove any...
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Thu, 27 Jul 2006 22:00:04 +0000 (22:00 +0000)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Thu, 27 Jul 2006 22:00:04 +0000 (22:00 +0000)
lib/rbot/ircbot.rb

index a0b64d9b31b6bdee81d381ec7aeea0c9fdb0cb4a..5be3cc7802ac52a2cf9737e3fd0ecd34ab3d6d8d 100644 (file)
@@ -258,7 +258,7 @@ class IrcBot
 
     @logfile = @config['log.file']
     if @logfile.class!=String || @logfile.empty?
-      @logfile = File.basename(botclass)+".log"
+      @logfile = "#{botclass}/#{File.basename(botclass).gsub(/^\.+/,'')}.log"
     end
 
     # See http://blog.humlab.umu.se/samuel/archives/000107.html