This does not change any of the behavior of the system yet.
/*
* Get or set global configuration options
+ *
+ * IF YOU ADD OR CHANGE FIELDS HERE, YOU *MUST* DOCUMENT YOUR CHANGES AT:
+ * http://www.citadel.org/doku.php/documentation:appproto:system_config
+ *
*/
void cmd_conf(char *argbuf)
{
cprintf("%ld\n", config.c_pop3_fetch);
cprintf("%ld\n", config.c_pop3_fastest);
cprintf("%d\n", config.c_spam_flag_only);
+ cprintf("%d\n", config.c_guest_logins);
cprintf("000\n");
}
case 66:
config.c_spam_flag_only = atoi(buf);
break;
+ case 67:
+ config.c_guest_logins = atoi(buf);
+ break;
}
++a;
}
CFG_VALUE(CHAR(c_imap_keep_from), " IMAP keep original from header in msgs");
CFG_VALUE(INTEGER(c_xmpp_c2s_port), " XMPP client-to-server port (usually 5222)");
CFG_VALUE(INTEGER(c_xmpp_s2s_port), " XMPP server-to-server port (usually 5269)");
-CFG_VALUE(TIME(c_pop3_fetch), " How often to fetch POP3 messages");
-CFG_VALUE(TIME(c_pop3_fastest), " Users can specify POP3 fetching this often");
-CFG_VALUE(INTEGER(c_spam_flag_only), " 1 = flag instead of reject spam");
+CFG_VALUE(TIME(c_pop3_fetch), " How often to fetch POP3 messages");
+CFG_VALUE(TIME(c_pop3_fastest), " Users can specify POP3 fetching this often");
+CFG_VALUE(INTEGER(c_spam_flag_only), " 1 = flag instead of reject spam");
+CFG_VALUE(INTEGER(c_guest_logins), " 1 = enable anonymous guest logins");
void do_system_configuration(CtdlIPC *ipc)
{
-#define NUM_CONFIGS 67
+#define NUM_CONFIGS 68
char buf[256];
char sc[NUM_CONFIGS][256];
atoi(&sc[29][0]))));
strprompt("Initial access level for new users", &sc[6][0], 1);
strprompt("Access level required to create rooms", &sc[19][0], 1);
+ snprintf(sc[67], sizeof sc[67], "%d", (boolprompt(
+ "Allow anonymous guest logins",
+ atoi(&sc[67][0]))));
snprintf(sc[4], sizeof sc[4], "%d", (boolprompt(
"Automatically give room aide privs to a user who creates a private room",
atoi(&sc[4][0]))));