Commit cb410f62 authored by deuce's avatar deuce
Browse files

Add a new WM_FORCEFWD writemsg mode (which is only supported by email())

to allow the caller to skip the question (ie: for new user feedback validation)
This replaces the "never prompt for validation user" patch since:

DigitalMan: I suppose if someone has an issue, a new mode bit could be burned for that

Is clearly permission.
parent 6ec9bd3d
......@@ -92,7 +92,7 @@ bool sbbs_t::email(int usernumber, const char *top, const char *subj, long mode)
if((l&NETMAIL) && (cfg.sys_misc&SM_FWDTONET)) {
getuserrec(&cfg,usernumber,U_NETMAIL,LEN_NETMAIL,str);
bprintf(text[UserNetMail],str);
if(usernumber==cfg.node_valuser || text[ForwardMailQ][0]==0 || yesno(text[ForwardMailQ])) /* Forward to netmail address */
if((mode & WM_FORCEFWD) || text[ForwardMailQ][0]==0 || yesno(text[ForwardMailQ])) /* Forward to netmail address */
return(netmail(str,subj,mode));
}
bprintf(text[Emailing],username(&cfg,usernumber,tmp),usernumber);
......
......@@ -461,11 +461,11 @@ BOOL sbbs_t::newuser()
safe_snprintf(str,sizeof(str),text[NewUserFeedbackHdr]
,nulstr,getage(&cfg,useron.birth),useron.sex,useron.birth
,useron.name,useron.phone,useron.comp,useron.modem);
email(cfg.node_valuser,str,"New User Validation",WM_EMAIL|WM_SUBJ_RO);
email(cfg.node_valuser,str,"New User Validation",WM_EMAIL|WM_SUBJ_RO|WM_FORCEFW);
if(!useron.fbacks && !useron.emails) {
if(online) { /* didn't hang up */
bprintf(text[NoFeedbackWarning],username(&cfg,cfg.node_valuser,tmp));
email(cfg.node_valuser,str,"New User Validation",WM_EMAIL|WM_SUBJ_RO);
email(cfg.node_valuser,str,"New User Validation",WM_EMAIL|WM_SUBJ_RO|WM_FORCEFW);
} /* give 'em a 2nd try */
if(!useron.fbacks && !useron.emails) {
bprintf(text[NoFeedbackWarning],username(&cfg,cfg.node_valuser,tmp));
......
......@@ -724,6 +724,7 @@ typedef enum { /* Values for xtrn_t.event */
#define WM_PRIVATE (1<<8) /* Private (for creating MSGINF file) */
#define WM_SUBJ_RO (1<<9) /* Subject/title is read-only */
#define WM_EDIT (1<<10) /* Editing existing message */
#define WM_FORCEFWD (1<<11) /* Force "yes" to ForwardMailQ for email */
/* Bits in the mode of loadposts() */
#define LP_BYSELF (1<<0) /* Include messages sent by self */
......
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