2 * Configuration screens that are part of the text mode client.
4 * Copyright (c) 1987-2018 by the citadel.org team
6 * This program is open source software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 3.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
15 #include "textclient.h"
18 extern char tempdir[];
19 extern char *axdefs[8];
20 extern long highest_msg_read;
21 extern long maxmsgnum;
22 extern unsigned room_flags;
23 extern int screenwidth;
24 char editor_path[PATH_MAX];
28 * General system configuration command
30 void do_system_configuration(CtdlIPC * ipc)
33 /* NUM_CONFIGS is now defined in citadel.h */
36 char sc[NUM_CONFIGS][256];
38 struct ExpirePolicy *site_expirepolicy = NULL;
39 struct ExpirePolicy *mbx_expirepolicy = NULL;
42 int r; /* IPC response code */
43 int server_configs = 0;
45 /* Clear out the config buffers */
46 memset(&sc[0][0], 0, sizeof(sc));
48 /* Fetch the current config */
49 r = CtdlIPCGetSystemConfig(ipc, &resp, buf);
51 server_configs = num_tokens(resp, '\n');
52 for (a = 0; a < server_configs; ++a) {
53 if (a < NUM_CONFIGS) {
54 extract_token(&sc[a][0], resp, a, '\n', sizeof sc[a]);
61 /* Fetch the expire policy (this will silently fail on old servers,
62 * resulting in "default" policy)
64 r = CtdlIPCGetMessageExpirationPolicy(ipc, 2, &site_expirepolicy, buf);
65 r = CtdlIPCGetMessageExpirationPolicy(ipc, 3, &mbx_expirepolicy, buf);
67 /* Identification parameters */
69 strprompt("Node name", &sc[0][0], 15);
70 strprompt("Fully qualified domain name", &sc[1][0], 63);
71 strprompt("Human readable node name", &sc[2][0], 20);
72 strprompt("Telephone number", &sc[3][0], 15);
73 strprompt("Geographic location of this system", &sc[12][0], 31);
74 strprompt("Name of system administrator", &sc[13][0], 25);
75 strprompt("Paginator prompt", &sc[10][0], 79);
77 /* Security parameters */
79 snprintf(sc[7], sizeof sc[7], "%d", (boolprompt("Require registration for new users", atoi(&sc[7][0]))));
80 snprintf(sc[29], sizeof sc[29], "%d", (boolprompt("Disable self-service user account creation", atoi(&sc[29][0]))));
81 strprompt("Initial access level for new users", &sc[6][0], 1);
82 strprompt("Access level required to create rooms", &sc[19][0], 1);
83 snprintf(sc[67], sizeof sc[67], "%d", (boolprompt("Allow anonymous guest logins", atoi(&sc[67][0]))));
84 snprintf(sc[4], sizeof sc[4], "%d", (boolprompt("Automatically give room admin privs to a user who creates a private room",
87 snprintf(sc[8], sizeof sc[8], "%d", (boolprompt("Automatically move problem user messages to twit room", atoi(&sc[8][0]))));
89 strprompt("Name of twit room", &sc[9][0], ROOMNAMELEN);
90 snprintf(sc[11], sizeof sc[11], "%d", (boolprompt("Restrict Internet mail to only those with that privilege",
92 snprintf(sc[26], sizeof sc[26], "%d", (boolprompt("Allow admins to Zap (forget) rooms", atoi(&sc[26][0]))));
94 if (!IsEmptyStr(&sc[18][0])) {
99 logpages = boolprompt("Log all instant messages", logpages);
101 strprompt("Name of logging room", &sc[18][0], ROOMNAMELEN);
106 /* Commented out because this setting isn't really appropriate to
107 * change while the server is running.
109 * snprintf(sc[52], sizeof sc[52], "%d", (boolprompt(
110 * "Use system authentication",
111 * atoi(&sc[52][0]))));
116 strprompt("Server connection idle timeout (in seconds)", &sc[5][0], 4);
117 strprompt("Maximum concurrent sessions", &sc[14][0], 4);
118 strprompt("Maximum message length", &sc[20][0], 20);
119 strprompt("Minimum number of worker threads", &sc[21][0], 3);
120 strprompt("Maximum number of worker threads", &sc[22][0], 3);
121 snprintf(sc[43], sizeof sc[43], "%d", (boolprompt("Automatically delete committed database logs", atoi(&sc[43][0]))));
123 strprompt("Server IP address (* for 'any')", &sc[37][0], 15);
124 strprompt("POP3 server port (-1 to disable)", &sc[23][0], 5);
125 strprompt("POP3S server port (-1 to disable)", &sc[40][0], 5);
126 strprompt("IMAP server port (-1 to disable)", &sc[27][0], 5);
127 strprompt("IMAPS server port (-1 to disable)", &sc[39][0], 5);
128 strprompt("SMTP MTA server port (-1 to disable)", &sc[24][0], 5);
129 strprompt("SMTP MSA server port (-1 to disable)", &sc[38][0], 5);
130 strprompt("SMTPS server port (-1 to disable)", &sc[41][0], 5);
131 strprompt("NNTP server port (-1 to disable)", &sc[70][0], 5);
132 strprompt("NNTPS server port (-1 to disable)", &sc[71][0], 5);
133 strprompt("Postfix TCP Dictionary Port server port (-1 to disable)", &sc[50][0], 5);
134 strprompt("ManageSieve server port (-1 to disable)", &sc[51][0], 5);
136 strprompt("XMPP (Jabber) client to server port (-1 to disable)", &sc[62][0], 5);
137 /* No prompt because we don't implement this service yet, it's just a placeholder */
138 /* strprompt("XMPP (Jabber) server to server port (-1 to disable)", &sc[63][0], 5); */
140 /* This logic flips the question around, because it's one of those
141 * situations where 0=yes and 1=no
145 a = boolprompt("Correct forged From: lines during authenticated SMTP", a);
147 snprintf(sc[25], sizeof sc[25], "%d", a);
149 snprintf(sc[66], sizeof sc[66], "%d", (boolprompt("Flag messages as spam instead of rejecting", atoi(&sc[66][0]))));
151 /* This logic flips the question around, because it's one of those
152 * situations where 0=yes and 1=no
156 a = boolprompt("Force IMAP posts in public rooms to be from the user who submitted them", a);
158 snprintf(sc[61], sizeof sc[61], "%d", a);
160 snprintf(sc[45], sizeof sc[45], "%d", (boolprompt("Allow unauthenticated SMTP clients to spoof my domains",
162 snprintf(sc[57], sizeof sc[57], "%d", (boolprompt("Perform RBL checks at greeting instead of after RCPT",
166 if (ipc->ServInfo.supports_ldap) {
167 a = strlen(&sc[32][0]);
168 a = (a ? 1 : 0); /* Set only to 1 or 0 */
169 a = boolprompt("Do you want to configure LDAP authentication?", a);
171 strprompt("Host name of LDAP server", &sc[32][0], 127);
172 strprompt("Port number of LDAP service", &sc[33][0], 5);
173 strprompt("Base DN", &sc[34][0], 255);
174 strprompt("Bind DN (or blank for anonymous bind)", &sc[35][0], 255);
175 strprompt("Password for bind DN (or blank for anonymous bind)", &sc[36][0], 255);
177 strcpy(&sc[32][0], "");
181 /* Expiry settings */
182 strprompt("Default user purge time (days)", &sc[16][0], 5);
183 strprompt("Default room purge time (days)", &sc[17][0], 5);
185 /* Angels and demons dancing in my head... */
187 snprintf(buf, sizeof buf, "%d", site_expirepolicy->expire_mode);
188 strprompt("System default message expire policy (? for list)", buf, 1);
191 "1. Never automatically expire messages\n"
192 "2. Expire by message count\n" "3. Expire by message age\n");
194 } while ((buf[0] < '1') || (buf[0] > '3'));
195 site_expirepolicy->expire_mode = buf[0] - '0';
197 /* ...lunatics and monsters underneath my bed */
198 if (site_expirepolicy->expire_mode == 2) {
199 snprintf(buf, sizeof buf, "%d", site_expirepolicy->expire_value);
200 strprompt("Keep how many messages online?", buf, 10);
201 site_expirepolicy->expire_value = atol(buf);
203 if (site_expirepolicy->expire_mode == 3) {
204 snprintf(buf, sizeof buf, "%d", site_expirepolicy->expire_value);
205 strprompt("Keep messages for how many days?", buf, 10);
206 site_expirepolicy->expire_value = atol(buf);
209 /* Media messiahs preying on my fears... */
211 snprintf(buf, sizeof buf, "%d", mbx_expirepolicy->expire_mode);
212 strprompt("Mailbox default message expire policy (? for list)", buf, 1);
215 "0. Go with the system default\n"
216 "1. Never automatically expire messages\n"
217 "2. Expire by message count\n" "3. Expire by message age\n");
219 } while ((buf[0] < '0') || (buf[0] > '3'));
220 mbx_expirepolicy->expire_mode = buf[0] - '0';
222 /* ...Pop culture prophets playing in my ears */
223 if (mbx_expirepolicy->expire_mode == 2) {
224 snprintf(buf, sizeof buf, "%d", mbx_expirepolicy->expire_value);
225 strprompt("Keep how many messages online?", buf, 10);
226 mbx_expirepolicy->expire_value = atol(buf);
228 if (mbx_expirepolicy->expire_mode == 3) {
229 snprintf(buf, sizeof buf, "%d", mbx_expirepolicy->expire_value);
230 strprompt("Keep messages for how many days?", buf, 10);
231 mbx_expirepolicy->expire_value = atol(buf);
234 strprompt("How often to run network jobs (in seconds)", &sc[28][0], 5);
235 strprompt("Default frequency to run POP3 collection (in seconds)", &sc[64][0], 5);
236 strprompt("Fastest frequency to run POP3 collection (in seconds)", &sc[65][0], 5);
237 strprompt("Hour to run purges (0-23)", &sc[31][0], 2);
238 snprintf(sc[42], sizeof sc[42], "%d", (boolprompt("Enable full text search index (warning: resource intensive)",
241 snprintf(sc[46], sizeof sc[46], "%d", (boolprompt("Perform journaling of email messages", atoi(&sc[46][0]))));
242 snprintf(sc[47], sizeof sc[47], "%d", (boolprompt("Perform journaling of non-email messages", atoi(&sc[47][0]))));
243 if ((atoi(&sc[46][0])) || (atoi(&sc[47][0]))) {
244 strprompt("Email destination of journalized messages", &sc[48][0], 127);
247 /* No more Funambol */
253 /* External pager stuff */
255 if (strlen(sc[60]) > 0)
257 yes_pager = boolprompt("Configure an external pager tool", yes_pager);
259 strprompt("External pager tool", &sc[60][0], 255);
264 /* Master user account */
266 if (strlen(sc[58]) > 0)
268 yes_muacct = boolprompt("Enable a 'master user' account", yes_muacct);
270 strprompt("Master user name", &sc[58][0], 31);
271 strprompt("Master user password", &sc[59][0], -31);
273 strcpy(&sc[58][0], "");
274 strcpy(&sc[59][0], "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
278 scr_printf("Save this configuration? ");
281 for (a = 0; a < NUM_CONFIGS; a++) {
282 r += 1 + strlen(sc[a]);
284 resp = (char *) calloc(1, r);
286 scr_printf("Can't save config - out of memory!\n");
289 for (a = 0; a < NUM_CONFIGS; a++) {
293 r = CtdlIPCSetSystemConfig(ipc, resp, buf);
295 scr_printf("%s\n", buf);
299 r = CtdlIPCSetMessageExpirationPolicy(ipc, 2, site_expirepolicy, buf);
301 scr_printf("%s\n", buf);
304 r = CtdlIPCSetMessageExpirationPolicy(ipc, 3, mbx_expirepolicy, buf);
306 scr_printf("%s\n", buf);
310 if (site_expirepolicy)
311 free(site_expirepolicy);
312 if (mbx_expirepolicy)
313 free(mbx_expirepolicy);
318 * support function for do_internet_configuration()
320 void get_inet_rec_type(CtdlIPC * ipc, char *buf)
324 keyopt(" <1> localhost (Alias for this computer)\n");
325 keyopt(" <2> smart host (Forward all outbound mail to this host)\n");
326 keyopt(" <3> fallback host (Send mail to this host only if direct delivery fails)\n");
327 keyopt(" <4> SpamAssassin (Address of SpamAssassin server)\n");
328 keyopt(" <5> RBL (domain suffix of spam hunting RBL)\n");
329 keyopt(" <6> masq domains (Domains as which users are allowed to masquerade)\n");
330 keyopt(" <7> ClamAV (Address of ClamAV clamd server)\n");
331 sel = intprompt("Which one", 1, 1, 8);
334 strcpy(buf, "localhost");
337 strcpy(buf, "smarthost");
340 strcpy(buf, "fallbackhost");
343 strcpy(buf, "spamassassin");
349 strcpy(buf, "masqdomain");
352 strcpy(buf, "clamav");
359 * Internet mail configuration
361 void do_internet_configuration(CtdlIPC * ipc)
373 r = CtdlIPCGetSystemConfigByType(ipc, INTERNETCFG, &resp, buf);
375 while (!IsEmptyStr(resp)) {
376 extract_token(buf, resp, 0, '\n', sizeof buf);
377 remove_token(resp, 0, '\n');
379 // VILE SLEAZY HACK: replace obsolete "directory" domains with "localhost"
380 char *d = strstr(buf, "|directory");
382 strcpy(d, "|localhost");
387 recs = malloc(sizeof(char *));
389 recs = realloc(recs, (sizeof(char *)) * num_recs);
390 recs[num_recs - 1] = malloc(strlen(buf) + 1);
391 strcpy(recs[num_recs - 1], buf);
400 scr_printf("### Host or domain Record type \n");
402 scr_printf("--- -------------------------------------------------- --------------------\n");
403 for (i = 0; i < num_recs; ++i) {
405 scr_printf("%3d ", i + 1);
406 extract_token(buf, recs[i], 0, '|', sizeof buf);
408 scr_printf("%-50s ", buf);
409 extract_token(buf, recs[i], 1, '|', sizeof buf);
410 color(BRIGHT_MAGENTA);
411 scr_printf("%-20s\n", buf);
415 ch = keymenu("", "<A>dd|<D>elete|<S>ave|<Q>uit");
418 newprompt("Enter host name: ", buf, 50);
420 if (!IsEmptyStr(buf)) {
423 recs = malloc(sizeof(char *));
425 recs = realloc(recs, (sizeof(char *)) * num_recs);
428 get_inet_rec_type(ipc, &buf[strlen(buf)]);
429 recs[num_recs - 1] = strdup(buf);
434 i = intprompt("Delete which one", 1, 1, num_recs) - 1;
437 for (j = i; j < num_recs; ++j) {
438 recs[j] = recs[j + 1];
444 for (i = 0; i < num_recs; i++)
445 r += 1 + strlen(recs[i]);
446 resp = (char *) calloc(1, r);
448 scr_printf("Can't save config - out of memory!\n");
452 for (i = 0; i < num_recs; i++) {
453 strcat(resp, recs[i]);
456 r = CtdlIPCSetSystemConfigByType(ipc, INTERNETCFG, resp, buf);
458 scr_printf("%s\n", buf);
460 scr_printf("Wrote %d records.\n", num_recs);
466 quitting = !modified || boolprompt("Quit without saving", 0);
474 for (i = 0; i < num_recs; ++i)
483 * Edit network configuration for room sharing, mailing lists, etc.
485 void network_config_management(CtdlIPC * ipc, char *entrytype, char *comment)
487 char filename[PATH_MAX];
488 char changefile[PATH_MAX];
498 char *listing = NULL;
501 if (IsEmptyStr(editor_path)) {
502 scr_printf("You must have an external editor configured in order to use this function.\n");
506 CtdlMakeTempFileName(filename, sizeof filename);
507 CtdlMakeTempFileName(changefile, sizeof changefile);
509 tempfp = fopen(filename, "w");
510 if (tempfp == NULL) {
511 scr_printf("Cannot open %s: %s\n", filename, strerror(errno));
515 fprintf(tempfp, "# Configuration for room: %s\n", room_name);
516 fprintf(tempfp, "# %s\n", comment);
517 fprintf(tempfp, "# Specify one per line.\n" "\n\n");
519 r = CtdlIPCGetRoomNetworkConfig(ipc, &listing, buf);
521 while (listing && !IsEmptyStr(listing)) {
522 extract_token(buf, listing, 0, '\n', sizeof buf);
523 remove_token(listing, 0, '\n');
524 extract_token(instr, buf, 0, '|', sizeof instr);
525 if (!strcasecmp(instr, entrytype)) {
526 tokens = num_tokens(buf, '|');
527 for (i = 1; i < tokens; ++i) {
528 extract_token(addr, buf, i, '|', sizeof addr);
529 fprintf(tempfp, "%s", addr);
530 if (i < (tokens - 1)) {
531 fprintf(tempfp, "|");
534 fprintf(tempfp, "\n");
544 e_ex_code = 1; /* start with a failed exit code */
545 stty_ctdl(SB_RESTORE);
547 cksum = file_checksum(filename);
548 if (editor_pid == 0) {
549 chmod(filename, 0600);
550 putenv("WINDOW_TITLE=Network configuration");
551 execlp(editor_path, editor_path, filename, NULL);
554 if (editor_pid > 0) {
557 b = ka_wait(&e_ex_code);
558 } while ((b != editor_pid) && (b >= 0));
563 if (file_checksum(filename) == cksum) {
564 scr_printf("*** No changes to save.\n");
568 if (e_ex_code == 0) { /* Save changes */
569 changefp = fopen(changefile, "w");
571 /* Load all netconfig entries that are *not* of the type we are editing */
572 r = CtdlIPCGetRoomNetworkConfig(ipc, &listing, buf);
574 while (listing && !IsEmptyStr(listing)) {
575 extract_token(buf, listing, 0, '\n', sizeof buf);
576 remove_token(listing, 0, '\n');
577 extract_token(instr, buf, 0, '|', sizeof instr);
578 if (strcasecmp(instr, entrytype)) {
579 fprintf(changefp, "%s\n", buf);
588 /* ...and merge that with the data we just edited */
589 tempfp = fopen(filename, "r");
590 while (fgets(buf, sizeof buf, tempfp) != NULL) {
591 for (i = 0; i < strlen(buf); ++i) {
596 if (!IsEmptyStr(buf)) {
597 fprintf(changefp, "%s|%s\n", entrytype, buf);
603 /* now write it to the server... */
604 changefp = fopen(changefile, "r");
605 if (changefp != NULL) {
606 listing = load_message_from_file(changefp);
608 r = CtdlIPCSetRoomNetworkConfig(ipc, listing, buf);
616 unlink(filename); /* Delete the temporary files */
622 * POP3 aggregation client configuration
624 void do_pop3client_configuration(CtdlIPC * ipc)
633 char *listing = NULL;
634 char *other_listing = NULL;
638 r = CtdlIPCGetRoomNetworkConfig(ipc, &listing, buf);
640 while (listing && !IsEmptyStr(listing)) {
641 extract_token(buf, listing, 0, '\n', sizeof buf);
642 remove_token(listing, 0, '\n');
643 extract_token(instr, buf, 0, '|', sizeof instr);
644 if (!strcasecmp(instr, "pop3client")) {
648 recs = malloc(sizeof(char *));
650 recs = realloc(recs, (sizeof(char *)) * num_recs);
651 recs[num_recs - 1] = malloc(SIZ);
652 strcpy(recs[num_recs - 1], buf);
665 scr_printf("### " " Remote POP3 host " " User name " "Keep on server? " "\n");
667 scr_printf("--- " "---------------------------- " "---------------------------- " "--------------- " "\n");
668 for (i = 0; i < num_recs; ++i) {
670 scr_printf("%3d ", i + 1);
672 extract_token(buf, recs[i], 1, '|', sizeof buf);
674 scr_printf("%-28s ", buf);
676 extract_token(buf, recs[i], 2, '|', sizeof buf);
677 color(BRIGHT_MAGENTA);
678 scr_printf("%-28s ", buf);
681 scr_printf("%-15s\n", (extract_int(recs[i], 4) ? "Yes" : "No"));
685 ch = keymenu("", "<A>dd|<D>elete|<S>ave|<Q>uit");
690 recs = malloc(sizeof(char *));
692 recs = realloc(recs, (sizeof(char *)) * num_recs);
694 strcpy(buf, "pop3client|");
695 newprompt("Enter host name: ", &buf[strlen(buf)], 28);
697 newprompt("Enter user name: ", &buf[strlen(buf)], 28);
699 newprompt("Enter password : ", &buf[strlen(buf)], 16);
701 scr_printf("Keep messages on server instead of deleting them? ");
702 sprintf(&buf[strlen(buf)], "%d", yesno());
704 recs[num_recs - 1] = strdup(buf);
708 i = intprompt("Delete which one", 1, 1, num_recs) - 1;
711 for (j = i; j < num_recs; ++j)
712 recs[j] = recs[j + 1];
717 for (i = 0; i < num_recs; ++i) {
718 r += 1 + strlen(recs[i]);
720 listing = (char *) calloc(1, r);
722 scr_printf("Can't save config - out of memory!\n");
726 for (i = 0; i < num_recs; ++i) {
727 strcat(listing, recs[i]);
728 strcat(listing, "\n");
731 /* Retrieve all the *other* records for merging */
732 r = CtdlIPCGetRoomNetworkConfig(ipc, &other_listing, buf);
734 for (i = 0; i < num_tokens(other_listing, '\n'); ++i) {
735 extract_token(buf, other_listing, i, '\n', sizeof buf);
736 if (strncasecmp(buf, "pop3client|", 11)) {
737 listing = realloc(listing, strlen(listing) + strlen(buf) + 10);
738 strcat(listing, buf);
739 strcat(listing, "\n");
744 r = CtdlIPCSetRoomNetworkConfig(ipc, listing, buf);
749 scr_printf("%s\n", buf);
751 scr_printf("Wrote %d records.\n", num_recs);
757 quitting = !modified || boolprompt("Quit without saving", 0);
765 for (i = 0; i < num_recs; ++i)
777 * RSS feed retrieval client configuration
779 void do_rssclient_configuration(CtdlIPC * ipc)
788 char *listing = NULL;
789 char *other_listing = NULL;
793 r = CtdlIPCGetRoomNetworkConfig(ipc, &listing, buf);
795 while (listing && !IsEmptyStr(listing)) {
796 extract_token(buf, listing, 0, '\n', sizeof buf);
797 remove_token(listing, 0, '\n');
798 extract_token(instr, buf, 0, '|', sizeof instr);
799 if (!strcasecmp(instr, "rssclient")) {
803 recs = malloc(sizeof(char *));
805 recs = realloc(recs, (sizeof(char *)) * num_recs);
806 recs[num_recs - 1] = malloc(SIZ);
807 strcpy(recs[num_recs - 1], buf);
820 scr_printf("### Feed URL\n");
822 scr_printf("--- " "---------------------------------------------------------------------------" "\n");
824 for (i = 0; i < num_recs; ++i) {
826 scr_printf("%3d ", i + 1);
828 extract_token(buf, recs[i], 1, '|', sizeof buf);
830 scr_printf("%-75s\n", buf);
835 ch = keymenu("", "<A>dd|<D>elete|<S>ave|<Q>uit");
840 recs = malloc(sizeof(char *));
842 recs = realloc(recs, (sizeof(char *)) * num_recs);
844 strcpy(buf, "rssclient|");
845 newprompt("Enter feed URL: ", &buf[strlen(buf)], 75);
847 recs[num_recs - 1] = strdup(buf);
851 i = intprompt("Delete which one", 1, 1, num_recs) - 1;
854 for (j = i; j < num_recs; ++j)
855 recs[j] = recs[j + 1];
860 for (i = 0; i < num_recs; ++i) {
861 r += 1 + strlen(recs[i]);
863 listing = (char *) calloc(1, r);
865 scr_printf("Can't save config - out of memory!\n");
869 for (i = 0; i < num_recs; ++i) {
870 strcat(listing, recs[i]);
871 strcat(listing, "\n");
874 /* Retrieve all the *other* records for merging */
875 r = CtdlIPCGetRoomNetworkConfig(ipc, &other_listing, buf);
877 for (i = 0; i < num_tokens(other_listing, '\n'); ++i) {
878 extract_token(buf, other_listing, i, '\n', sizeof buf);
879 if (strncasecmp(buf, "rssclient|", 10)) {
880 listing = realloc(listing, strlen(listing) + strlen(buf) + 10);
881 strcat(listing, buf);
882 strcat(listing, "\n");
887 r = CtdlIPCSetRoomNetworkConfig(ipc, listing, buf);
892 scr_printf("%s\n", buf);
894 scr_printf("Wrote %d records.\n", num_recs);
900 quitting = !modified || boolprompt("Quit without saving", 0);
908 for (i = 0; i < num_recs; ++i)