summaryrefslogtreecommitdiff
path: root/lib/rbot
diff options
context:
space:
mode:
authordmitry kim <jason@nichego.net>2008-04-16 01:59:03 +0400
committerdmitry kim <jason@nichego.net>2008-04-16 01:59:03 +0400
commit5558808a3f0b63a7c8fadcadcee6f09aecea2e62 (patch)
tree9456abaebb73042bbe37538e00f7cedb74e186e9 /lib/rbot
parentdd87231af22d1a94562b1c6b312c8af97d258bfb (diff)
+ ircbot logging: log_session_end on restarts, too
Diffstat (limited to 'lib/rbot')
-rw-r--r--lib/rbot/ircbot.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb
index 057170b8..01b9d5b6 100644
--- a/lib/rbot/ircbot.rb
+++ b/lib/rbot/ircbot.rb
@@ -1086,9 +1086,11 @@ class Bot
# now we re-exec
# Note, this fails on Windows
debug "going to exec #{$0} #{@argv.inspect} from #{@run_dir}"
+ log_session_end
Dir.chdir(@run_dir)
exec($0, *@argv)
rescue Errno::ENOENT
+ log_session_end
exec("ruby", *(@argv.unshift $0))
rescue Exception => e
$interrupted += 1