Converted citserver.c to the new config format
authorArt Cancro <ajc@uncensored.citadel.org>
Wed, 29 Apr 2015 14:58:43 +0000 (10:58 -0400)
committerArt Cancro <ajc@uncensored.citadel.org>
Wed, 29 Apr 2015 14:58:43 +0000 (10:58 -0400)
citadel/citserver.c

index 076f5cee9ba0b7010f04d7c918260036dddde6c3..ce562ccdbba6953e58636d589e446044101d93d4 100644 (file)
@@ -150,10 +150,10 @@ void master_startup(void) {
        check_ref_counts();
 
        syslog(LOG_INFO, "Creating base rooms (if necessary)\n");
-       CtdlCreateRoom(config.c_baseroom,       0, "", 0, 1, 0, VIEW_BBS);
-       CtdlCreateRoom(AIDEROOM,                3, "", 0, 1, 0, VIEW_BBS);
-       CtdlCreateRoom(SYSCONFIGROOM,           3, "", 0, 1, 0, VIEW_BBS);
-       CtdlCreateRoom(config.c_twitroom,       0, "", 0, 1, 0, VIEW_BBS);
+       CtdlCreateRoom(CtdlGetConfigStr("c_baseroom"),  0, "", 0, 1, 0, VIEW_BBS);
+       CtdlCreateRoom(AIDEROOM,                        3, "", 0, 1, 0, VIEW_BBS);
+       CtdlCreateRoom(SYSCONFIGROOM,                   3, "", 0, 1, 0, VIEW_BBS);
+       CtdlCreateRoom(CtdlGetConfigStr("c_twitroom"),  0, "", 0, 1, 0, VIEW_BBS);
 
        /* The "Local System Configuration" room doesn't need to be visible */
         if (CtdlGetRoomLock(&qrbuf, SYSCONFIGROOM) == 0) {
@@ -301,7 +301,7 @@ int CtdlIsPublicClient(void)
                safestrncpy(public_clientspos, LOCALHOSTSTR, sizeof public_clients);
                public_clientspos += sizeof(LOCALHOSTSTR) - 1;
                
-               if (hostname_to_dotted_quad(addrbuf, config.c_fqdn) == 0) {
+               if (hostname_to_dotted_quad(addrbuf, CtdlGetConfigStr("c_fqdn")) == 0) {
                        *(public_clientspos++) = '|';
                        paddr = &addrbuf[0];
                        while (!IsEmptyStr (paddr) && 
@@ -363,12 +363,12 @@ 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,
-                       config.c_nodename, config.c_maxsessions
+                       CtdlGetConfigStr("c_nodename"), CtdlGetConfigInt("c_maxsessions")
                );
                CC->kill_me = KILLME_MAX_SESSIONS_EXCEEDED;
        }
        else {
-               cprintf("%d %s Citadel server ready.\n", CIT_OK, config.c_nodename);
+               cprintf("%d %s Citadel server ready.\n", CIT_OK, CtdlGetConfigStr("c_nodename"));
                CC->can_receive_im = 1;
        }
 }
@@ -376,7 +376,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, config.c_nodename);
+       cprintf("%d %s Citadel server ADMIN CONNECTION ready.\n", CIT_OK, CtdlGetConfigStr("c_nodename"));
 }