summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/rbot/core/irclog.rb6
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}"