From: Giuseppe Bilotta Date: Thu, 27 Jul 2006 22:00:04 +0000 (+0000) Subject: Fix the location for the bot log: put it in the botclass directory, and remove any... X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=df333b041363b44df3d4cc667d90a75d2b76f6c3;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git Fix the location for the bot log: put it in the botclass directory, and remove any initial dots to prevent it from being hidden --- diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb index a0b64d9b..5be3cc78 100644 --- a/lib/rbot/ircbot.rb +++ b/lib/rbot/ircbot.rb @@ -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