]> git.donarmstrong.com Git - infobot.git/blobdiff - src/core.pl
- moved scripts/setup_sql.pl to src/db_mysql as &createTables()
[infobot.git] / src / core.pl
index 20f75b392a22ad0b4ff182a5306788ee5abf6fb6..91115146a3fcecab992bed1e0581c39da060e4f2 100644 (file)
@@ -89,6 +89,7 @@ sub doExit {
        &status("parent caught SIG$sig (pid $$).") if (defined $sig);
 
        &status("--- Start of quit.");
+       $ident ||= "blootbot";  # lame hack.
 
        &closeDCC();
        &closePID();
@@ -354,6 +355,7 @@ sub setup {
     $shm = &openSHM();
     &openSQLDebug()    if (&IsParam("SQLDebug"));
     &openDB($param{'DBName'}, $param{'SQLUser'}, $param{'SQLPass'});
+    &checkTables();
 
     &status("Setup: ". &countKeys("factoids") ." factoids.");
     &News::readNews() if (&ChanConfList("news"));
@@ -415,6 +417,8 @@ sub shutdown {
     # reverse order of &setup().
     &DEBUG("shutdown called.");
 
+    $ident ||= "blootbot";     # hack.
+
     # opened files must be written to on shutdown/hup/whatever
     # unless they're write-only, like uptime.
     &writeUserFile();