Removed some leftover dependencies on message fields which no longer exist
[citadel.git] / citadel / citserver.c
index 6e287a7067bf458ffee95f9839547bef03b47ecd..b9648f6f70a3ba3b3b5759e992d1069477583070 100644 (file)
@@ -1,7 +1,7 @@
 /* 
  * Main source module for the Citadel server
  *
- * Copyright (c) 1987-2019 by the citadel.org team
+ * Copyright (c) 1987-2020 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License, version 3.
@@ -71,6 +71,13 @@ void master_startup(void)
        validate_config();
        migrate_legacy_control_record();
 
+       // If we have an existing database that is older than version 928, reindex the user records.
+       // Unfortunately we cannot do this in serv_upgrade.c because it needs to happen VERY early during startup.
+       int existing_db = CtdlGetConfigInt("MM_hosted_upgrade_level");
+       if ( (existing_db > 0) && (existing_db < 928) ) {
+               ForEachUser(reindex_user_928, NULL);
+       }
+
        /* Check floor reference counts */
        check_ref_counts();
 
@@ -182,12 +189,12 @@ char CtdlCheckExpress(void)
 void citproto_begin_session()
 {
        if (CC->nologin == 1) {
-               cprintf("%d %s: Too many users are already online (maximum is %d)\n",
-                       ERROR + MAX_SESSIONS_EXCEEDED, CtdlGetConfigStr("c_nodename"), CtdlGetConfigInt("c_maxsessions")
+               cprintf("%d Too many users are already online (maximum is %d)\n",
+                       ERROR + MAX_SESSIONS_EXCEEDED, CtdlGetConfigInt("c_maxsessions")
                    );
                CC->kill_me = KILLME_MAX_SESSIONS_EXCEEDED;
        } else {
-               cprintf("%d %s Citadel server ready.\n", CIT_OK, CtdlGetConfigStr("c_nodename"));
+               cprintf("%d %s Citadel server ready.\n", CIT_OK, CtdlGetConfigStr("c_fqdn"));
                CC->can_receive_im = 1;
        }
 }
@@ -196,7 +203,7 @@ void citproto_begin_session()
 void citproto_begin_admin_session()
 {
        CC->internal_pgm = 1;
-       cprintf("%d %s Citadel server ADMIN CONNECTION ready.\n", CIT_OK, CtdlGetConfigStr("c_nodename"));
+       cprintf("%d %s Citadel server ADMIN CONNECTION ready.\n", CIT_OK, CtdlGetConfigStr("c_fqdn"));
 }