]> git.donarmstrong.com Git - infobot.git/commitdiff
- write opened files on shutdown/hup
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sat, 7 Apr 2001 12:05:18 +0000 (12:05 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sat, 7 Apr 2001 12:05:18 +0000 (12:05 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@430 c11ca15a-4712-0410-83d8-924469b57eb5

src/core.pl

index 02db5aac7f17420778a8221dfcbc8c13f480fa3a..1c7b6d4ce63e62b5b255901fdb3263ad066cda9b 100644 (file)
@@ -354,6 +354,12 @@ sub shutdown {
     # reverse order of &setup().
     &DEBUG("shutdown called.");
 
     # 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();
     &closeDB();
     &closeSHM($shm);   # aswell. TODO: use this in &doExit?
     &closeLog();