diff options
author | dmitry kim <jason@nichego.net> | 2008-04-15 04:29:37 +0400 |
---|---|---|
committer | dmitry kim <jason@nichego.net> | 2008-04-15 04:29:37 +0400 |
commit | ec5a16fa448c1eeba69697617183bda8ec0c863a (patch) | |
tree | 9e8dbde2b9852e8c5c8c8483a0b485baf113f7d9 | |
parent | 18e86e2130304a8b8537d6984da82e0de2f9c13c (diff) |
+ core/irclog: time stamp on open
-rw-r--r-- | lib/rbot/core/irclog.rb | 6 |
1 files 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}" |