From ec5a16fa448c1eeba69697617183bda8ec0c863a Mon Sep 17 00:00:00 2001 From: dmitry kim Date: Tue, 15 Apr 2008 04:29:37 +0400 Subject: + core/irclog: time stamp on open --- lib/rbot/core/irclog.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/rbot/core/irclog.rb b/lib/rbot/core/irclog.rb index 93e62e3d..fcaf1b75 100644 --- a/lib/rbot/core/irclog.rb +++ b/lib/rbot/core/irclog.rb @@ -26,8 +26,10 @@ class IrcLogModule < CoreBotModule where_str = where.downcase.gsub(/[:!?$*()\/\\<>|"']/, "_") end unless(@logs.has_key?(where_str)) - @logs[where_str] = File.new("#{@bot.botclass}/logs/#{where_str}", "a") - @logs[where_str].sync = true + f = File.new("#{@bot.botclass}/logs/#{where_str}", "a") + f.sync = true + f.puts "[#{stamp}] @ Log started by #{@bot.myself.nick}" + @logs[where_str] = f end @logs[where_str].puts "[#{stamp}] #{message}" #debug "[#{stamp}] <#{where}> #{message}" -- cgit v1.2.3