Commit dd013679 authored by rswindell's avatar rswindell
Browse files

Added user question (cfg.uq) toggle: UQ_NOUPRLWR to disable the forced

upper/lower case strings in new user-supplied strings.
parent 817058b7
......@@ -50,6 +50,7 @@ void sbbs_t::newuser()
int file;
uint i,j;
long misc;
long kmode;
bool usa;
FILE *stream;
......@@ -148,6 +149,11 @@ void sbbs_t::newuser()
useron.shell=cfg.new_shell;
useron.alias[0]=0;
kmode=(cfg.uq&UQ_NOEXASC)|K_EDIT|K_AUTODEL;
if(!(cfg.uq&UQ_NOUPRLWR))
kmode|=K_UPRLWR;
while(online) {
if(autoterm || yesno(text[AutoTerminalQ])) {
......@@ -185,8 +191,7 @@ void sbbs_t::newuser()
bputs(text[EnterYourAlias]);
else
bputs(text[EnterYourRealName]);
getstr(useron.alias,LEN_ALIAS
,K_UPRLWR|(cfg.uq&UQ_NOEXASC)|K_EDIT|K_AUTODEL);
getstr(useron.alias,LEN_ALIAS,kmode);
truncsp(useron.alias);
if(useron.alias[0]<=SP || !isalpha(useron.alias[0])
|| !stricmp(useron.alias,cfg.sys_id)
......@@ -202,8 +207,7 @@ void sbbs_t::newuser()
if(cfg.uq&UQ_ALIASES && cfg.uq&UQ_REALNAME) {
while(online) {
bputs(text[EnterYourRealName]);
if(!getstr(useron.name,LEN_NAME
,K_UPRLWR|(cfg.uq&UQ_NOEXASC)|K_EDIT|K_AUTODEL)
if(!getstr(useron.name,LEN_NAME,kmode)
|| trashcan(useron.name,"name")
|| strchr(useron.name,0xff)
|| !strchr(useron.name,SP)
......@@ -236,14 +240,12 @@ void sbbs_t::newuser()
if(cfg.uq&UQ_ADDRESS)
while(online) { /* Get address and zip code */
bputs(text[EnterYourAddress]);
if(getstr(useron.address,LEN_ADDRESS
,K_UPRLWR|(cfg.uq&UQ_NOEXASC)|K_EDIT|K_AUTODEL))
if(getstr(useron.address,LEN_ADDRESS,kmode))
break; }
if(!online) return;
while(cfg.uq&UQ_LOCATION && online) {
bputs(text[EnterYourCityState]);
if(getstr(useron.location,LEN_LOCATION
,K_UPRLWR|(cfg.uq&UQ_NOEXASC)|K_EDIT|K_AUTODEL)
if(getstr(useron.location,LEN_LOCATION,kmode)
&& (cfg.uq&UQ_NOCOMMAS || strchr(useron.location,',')))
break;
bputs("\r\nYou must include a comma between the city and state.\r\n");
......
......@@ -127,6 +127,7 @@
#define UQ_NODEF (1L<<16) /* Don't ask for default settings */
#define UQ_NOCOMMAS (1L<<17) /* Do not require commas in location */
#define UQ_NONETMAIL (1L<<18) /* Don't ask for e-mail/netmail address */
#define UQ_NOUPRLWR (1L<<19) /* Don't force upper/lower case strings */
/* Different bits in sys_misc */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment