]> jfr.im git - irc/quakenet/newserv.git/commitdiff
No reason we can't reload on the fly now.
authorChris Porter <redacted>
Thu, 2 Oct 2008 02:38:32 +0000 (03:38 +0100)
committerChris Porter <redacted>
Thu, 2 Oct 2008 02:38:32 +0000 (03:38 +0100)
trusts/trusts_commands.c

index 355c033bd93aff69fbd64ab8e8b8c5a00430c2e2..17b29af46fc1b5d4a4674d851bcd7ad9594e4389 100644 (file)
@@ -14,11 +14,18 @@ static void migrate_status(int errcode, void *tag) {
   if(!np)
     return;
 
-  if(!errcode) {
-    controlreply(np, "Migration complete.");
-    controlreply(np, "All functionality disabled, database unloaded -- please reload the module.");
-  } else if(errcode == MIGRATION_LASTERROR) {
-    controlreply(np, "An error occured after the database was unloaded -- please reload the module.");
+  if(!errcode || errcode == MIGRATION_LASTERROR) {
+    if(!errcode) {
+       controlreply(np, "Migration complete.");
+       controlreply(np, "Attempting to reload database. . .");
+    } else {
+      controlreply(np, "An error occured after the database was unloaded, attempting reload. . .");
+    }
+    if(trusts_loaddb()) {
+      controlreply(np, "Database reloaded successfully.");
+    } else {
+      controlreply(np, "An error occured, please reload the module manually.");
+    }
   } else {
     controlreply(np, "Error %d occured during migration, commands reregistered.", errcode);
     registercommands(0, NULL);