From bac4933bb0017c4a4c631069dfa1d7e9df73494e Mon Sep 17 00:00:00 2001
From: dms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Date: Sat, 7 Apr 2001 12:05:18 +0000
Subject: [PATCH] - write opened files on shutdown/hup

git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@430 c11ca15a-4712-0410-83d8-924469b57eb5
---
 blootbot/src/core.pl | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/blootbot/src/core.pl b/blootbot/src/core.pl
index 02db5aa..1c7b6d4 100644
--- a/blootbot/src/core.pl
+++ b/blootbot/src/core.pl
@@ -354,6 +354,12 @@ sub shutdown {
     # reverse order of &setup().
     &DEBUG("shutdown called.");
 
+    # opened files must be written to on shutdown/hup/whatever
+    # unless they're write-only, like uptime.
+    &writeUserFile();
+    &writeChanFile();
+    &News::writeNews()	if (&ChanConfList("news"));
+
     &closeDB();
     &closeSHM($shm);	# aswell. TODO: use this in &doExit?
     &closeLog();
-- 
2.39.5