]> git.donarmstrong.com Git - infobot.git/commitdiff
- use new sql functions
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sun, 24 Nov 2002 12:57:32 +0000 (12:57 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sun, 24 Nov 2002 12:57:32 +0000 (12:57 +0000)
  although at the same time, news support has been removed
  (trying to move over to sql backend... difficult!)

git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@702 c11ca15a-4712-0410-83d8-924469b57eb5

src/core.pl

index e3118e968c392931c393ff03a9ca965cb968d984..dbdc509b58fa497463a85c7a8d4b5a6151350213 100644 (file)
@@ -113,8 +113,7 @@ sub doExit {
        &writeUserFile();
        &writeChanFile();
        &uptimeWriteFile()      if (&IsChanConf("uptime"));
-       &News::writeNews()      if (&ChanConfList("news"));
-       &closeDB();
+       &sqlCloseDB();
        &closeSHM($shm);
        &dumpallvars()          if (&IsParam("dumpvarsAtExit"));
        &symdumpAll()           if (&IsParam("symdumpAtExit"));
@@ -427,12 +426,11 @@ sub setup {
 
     $shm = &openSHM();
     &openSQLDebug()    if (&IsParam("SQLDebug"));
-    &openDB($param{'DBName'}, $param{'DBType'}, $param{'SQLUser'},
+    &sqlOpenDB($param{'DBName'}, $param{'DBType'}, $param{'SQLUser'},
        $param{'SQLPass'});
     &checkTables();
 
     &status("Setup: ". &countKeys("factoids") ." factoids.");
-    &News::readNews() if (&ChanConfList("news"));
     &getChanConfDefault("sendPrivateLimitLines", 3);
     &getChanConfDefault("sendPrivateLimitBytes", 1000);
     &getChanConfDefault("sendPublicLimitLines", 3);
@@ -498,9 +496,8 @@ sub shutdown {
     # unless they're write-only, like uptime.
     &writeUserFile();
     &writeChanFile();
-    &News::writeNews() if (&ChanConfList("news"));
 
-    &closeDB();
+    &sqlCloseDB();
     &closeSHM($shm);   # aswell. TODO: use this in &doExit?
     &closeLog();
 }