Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commits (1)
......@@ -592,6 +592,9 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen, long* pmode, bool
return birthdate_format(&cfg);
}
if(strcmp(sp, "GENDERS") == 0)
return cfg.new_genders;
if(!strcmp(sp,"TMSG")) {
l=0;
for(i=0;i<cfg.total_subs;i++)
......
......@@ -296,9 +296,13 @@ BOOL sbbs_t::newuser()
}
}
if(!online) return(FALSE);
if((cfg.uq&UQ_SEX) && text[EnterYourSex][0]) {
bputs(text[EnterYourSex]);
useron.sex=(char)getkeys("MF",0);
while((cfg.uq&UQ_SEX) && text[EnterYourGender][0] && cfg.new_genders[0] != '\0' && online) {
bputs(text[EnterYourGender]);
long gender = getkeys(cfg.new_genders, 0);
if(gender > 0) {
useron.sex = (char)gender;
break;
}
}
while((cfg.uq&UQ_BIRTH) && online && text[EnterYourBirthday][0]) {
bprintf(text[EnterYourBirthday], birthdate_format(&cfg));
......
......@@ -897,6 +897,7 @@ void sys_cfg(void)
strcpy(str,"None");
sprintf(opt[i++],"%-27.27s%s","Download Protocol",str);
sprintf(opt[i++],"%-27.27s%hu","Days of New Messages", cfg.new_msgscan_init);
sprintf(opt[i++],"%-27.27s%s", "Gender Options", cfg.new_genders);
strcpy(opt[i++],"Default Toggles...");
strcpy(opt[i++],"Question Toggles...");
opt[i][0]=0;
......@@ -1099,6 +1100,18 @@ void sys_cfg(void)
cfg.new_msgscan_init=atoi(str);
break;
case 14:
uifc.helpbuf=
"`New User Gender Options:`\n"
"\n"
"This is a list of single-character gender options for new users to\n"
"choose from.\n"
"\n"
"Default: `MFX`\n"
;
uifc.input(WIN_SAV|WIN_MID,0,0,"Gender Options"
,cfg.new_genders, sizeof(cfg.new_genders) -1 , K_EDIT|K_UPPER);
break;
case 15:
uifc.helpbuf=
"`New User Default Toggle Options:`\n"
"\n"
......@@ -1197,9 +1210,9 @@ void sys_cfg(void)
}
}
break;
case 15:
case 16:
uifc.helpbuf=
"`New User Question Toggle Options:`\n"
"`New User Question Toggles:`\n"
"\n"
"This menu allows you to decide which questions will be asked of a new\n"
"user.\n"
......
......@@ -492,6 +492,7 @@ typedef struct
char new_magic[21]; /* New User Magic Word */
char new_sif[LEN_SIFNAME+1]; /* New User SIF Questionaire */
char new_sof[LEN_SIFNAME+1]; /* New User SIF Questionaire output SIF */
char new_genders[41]; /* New User Gender options (default: "MF") */
char new_level; /* New User Main Level */
uint32_t new_flags1; /* New User Main Flags from set #1*/
uint32_t new_flags2; /* New User Main Flags from set #2*/
......
......@@ -262,10 +262,13 @@ BOOL read_main_cfg(scfg_t* cfg, char* error, size_t maxerrlen)
if(cfg->tempxfer_mod[0] == '\xff')
SAFECOPY(cfg->tempxfer_mod, "tempxfer");
get_int(c, instream);
for(i=0;i<112;i++) /* unused - initialized to 0xff */
for(i=0;i<92;i++) /* unused - initialized to 0xff */
get_int(n,instream);
get_str(cfg->new_genders, instream);
if(cfg->new_genders[0] == '\xff')
SAFECOPY(cfg->new_genders, "MFX");
get_int(cfg->user_backup_level,instream);
if(cfg->user_backup_level==0xffff)
cfg->user_backup_level=5;
......
......@@ -256,12 +256,11 @@ BOOL write_main_cfg(scfg_t* cfg, int backup_level)
put_str(cfg->postxtrn_mod,stream);
put_str(cfg->tempxfer_mod, stream);
c=0xff;
put_int(c, stream);
n=0xffff;
for(i=0;i<112;i++)
for(i=0;i<92;i++)
put_int(n,stream);
put_str(cfg->new_genders, stream);
put_int(cfg->user_backup_level,stream);
put_int(cfg->mail_backup_level,stream);
......
......@@ -352,7 +352,7 @@ enum {
,EnterYourRealName
,EnterYourCompany
,EnterYourHandle
,EnterYourSex
,EnterYourGender
,EnterYourAddress
,EnterYourPhoneNumber
,EnterYourBirthday
......
......@@ -551,7 +551,7 @@ const char * const text_defaults[TOTAL_TEXT]={
,"\x01\x5f\x01\x62\x01\x68\x5b\x01\x63\x40\x43\x48\x45\x43\x4b\x4d\x41\x52\x4b\x40\x01\x62\x5d\x20\x01\x79\x45\x6e\x74\x65\x72\x20"
"\x79\x6f\x75\x72\x20\x68\x61\x6e\x64\x6c\x65\x20\x6f\x72\x20\x63\x61\x6c\x6c\x2d\x73\x69\x67\x6e\x01\x5c\x3a\x20\x01\x77" // 341 EnterYourHandle
,"\x01\x5f\x01\x62\x01\x68\x5b\x01\x63\x40\x43\x48\x45\x43\x4b\x4d\x41\x52\x4b\x40\x01\x62\x5d\x20\x01\x79\x45\x6e\x74\x65\x72\x20"
"\x79\x6f\x75\x72\x20\x73\x65\x78\x20\x28\x4d\x2f\x46\x29\x01\x5c\x3a\x20\x01\x77" // 342 EnterYourSex
"\x79\x6f\x75\x72\x20\x67\x65\x6e\x64\x65\x72\x20\x28\x40\x47\x45\x4e\x44\x45\x52\x53\x40\x29\x01\x5c\x3a\x20\x01\x77" // 342 EnterYourGender
,"\x01\x5f\x01\x62\x01\x68\x5b\x01\x63\x40\x43\x48\x45\x43\x4b\x4d\x41\x52\x4b\x40\x01\x62\x5d\x20\x01\x79\x45\x6e\x74\x65\x72\x20"
"\x79\x6f\x75\x72\x20\x73\x74\x72\x65\x65\x74\x20\x61\x64\x64\x72\x65\x73\x73\x01\x5c\x3a\x20\x01\x77" // 343 EnterYourAddress
,"\x01\x5f\x01\x62\x01\x68\x5b\x01\x63\x40\x43\x48\x45\x43\x4b\x4d\x41\x52\x4b\x40\x01\x62\x5d\x20\x01\x79\x45\x6e\x74\x65\x72\x20"
......
......@@ -445,7 +445,7 @@ void sbbs_t::useredit(int usernumber)
putuserrec(&cfg,user.number,U_NAME,LEN_NAME,user.name);
break;
case 'S':
bputs(text[EnterYourSex]);
bputs(text[EnterYourGender]);
if(getstr(str,1,K_UPPER|K_LINE))
putuserrec(&cfg,user.number,U_SEX,1,str);
break;
......