Commit faeee936 authored by rswindell's avatar rswindell
Browse files

Created a msg_misc variable (in scfg_t) to store global message-related

toggle options (that don't fit in sys_misc), first bit used is MM_REALNAME
to control receipt of e-mail (Internet and local) based on user's real name.
parent 10925dde
......@@ -181,7 +181,8 @@ int sbbs_t::exec_function(csi_t *csi)
if(strchr(csi->str,'@')) {
i=1;
netmail(csi->str,nulstr,0); }
else if((i=finduser(csi->str))!=0)
else if((i=finduser(csi->str))!=0
|| (cfg.msg_misc&MM_REALNAME && (i=userdatdupe(0,U_NAME,LEN_NAME,csi->str,false))!=0))
email(i,nulstr,nulstr,WM_EMAIL);
csi->logic=!i;
return(0);
......@@ -212,7 +213,8 @@ int sbbs_t::exec_function(csi_t *csi)
if(strchr(csi->str,'@')) {
i=1;
netmail(csi->str,nulstr,WM_FILE); }
else if((i=finduser(csi->str))!=0)
else if((i=finduser(csi->str))!=0
|| (cfg.msg_misc&MM_REALNAME && (i=userdatdupe(0,U_NAME,LEN_NAME,csi->str,false))!=0))
email(i,nulstr,nulstr,WM_EMAIL|WM_FILE);
csi->logic=!i;
return(0);
......
......@@ -2181,13 +2181,13 @@ static void smtp_thread(void* arg)
for(tp=rcpt_name;*tp;tp++)
if(*tp=='.') *tp=' ';
if(!stricmp(rcpt_name,scfg.sys_op))
if(!stricmp(p,scfg.sys_op) || !stricmp(rcpt_name,scfg.sys_op))
usernum=1; /* RX by "sysop.alias" */
if(!usernum) /* RX by "real name" */
if(!usernum && scfg.msg_misc&MM_REALNAME) /* RX by "real name" */
usernum=userdatdupe(&scfg, 0, U_NAME, LEN_NAME, p, FALSE);
if(!usernum) /* RX by "real.name" */
if(!usernum && scfg.msg_misc&MM_REALNAME) /* RX by "real.name" */
usernum=userdatdupe(&scfg, 0, U_NAME, LEN_NAME, rcpt_name, FALSE);
}
}
......
......@@ -289,6 +289,10 @@
/* Bit values for cfg.file_misc */
#define FM_NO_LFN (1<<0) /* No long filenames in listings */
/* Bit values for cfg.msg_misc */
#define MM_REALNAME (1<<16) /* Allow receipt of e-mail using real names */
enum { /* errormsg() codes */
ERR_OPEN /* opening a file */
,ERR_CLOSE /* close a file */
......
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