$Log$
+ Revision 590.124 2002/03/03 06:48:25 ajc
+ * Client and server options to disable self-service user account creation
+
Revision 590.123 2002/03/03 06:31:58 ajc
* Added password starred-out entry to newprompt() and strprompt()
* Applied the above setting to password set/change in <.A>ide <U>seredit
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
+
int c_aide_zap; /* Are Aides allowed to zap rooms? */
int c_imap_port; /* IMAP listener port (usually 143) */
time_t c_net_freq; /* how often to run the networker */
+ char c_disable_newu; /* disable NEWU command */
};
#define NODENAME config.c_nodename
cprintf("%d\n", config.c_aide_zap);
cprintf("%d\n", config.c_imap_port);
cprintf("%ld\n", config.c_net_freq);
+ cprintf("%d\n", config.c_disable_newu);
cprintf("000\n");
}
break;
case 28: config.c_net_freq = atol(buf);
break;
+ case 29: config.c_disable_newu = atoi(buf);
+ if (config.c_disable_newu != 0)
+ config.c_disable_newu = 1;
+ break;
}
++a;
}
void do_system_configuration(void)
{
char buf[SIZ];
- char sc[29][SIZ];
+ char sc[30][SIZ];
int expire_mode = 0;
int expire_value = 0;
int a;
if (buf[0] == '1') {
a = 0;
while (serv_gets(buf), strcmp(buf, "000")) {
- if (a < 29) {
+ if (a < 30) {
strcpy(&sc[a][0], buf);
}
++a;
sprintf(&sc[7][0], "%d", (boolprompt(
"Require registration for new users",
atoi(&sc[7][0]))));
+ sprintf(&sc[29][0], "%d", (boolprompt(
+ "Disable self-service user account creation",
+ 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);
sprintf(&sc[4][0], "%d", (boolprompt(
serv_puts("CONF set");
serv_gets(buf);
if (buf[0] == '4') {
- for (a = 0; a < 29; ++a)
+ for (a = 0; a < 30; ++a)
serv_puts(&sc[a][0]);
serv_puts("000");
}
int a;
char username[SIZ];
+ if (config.c_disable_newu) {
+ cprintf("%d Self-service user account creation "
+ "is disabled on this system.\n", ERROR);
+ return;
+ }
+
if (CC->logged_in) {
cprintf("%d Already logged in.\n", ERROR);
return;