Commit d8c748fc authored by rswindell's avatar rswindell
Browse files

Another to-do list item: created option to specify whether or not signatures

are to be included in e-mail messages (default: enabled).
parent 6dcb131a
......@@ -278,8 +278,9 @@ typedef struct {
/* Bit values for cfg.file_misc */
#define FM_NO_LFN (1<<0) /* No long filenames in listings */
/* Bit values for cfg.msg_misc */
/* Bit values for cfg.msg_misc (upper 16-bits default to on) */
#define MM_REALNAME (1<<16) /* Allow receipt of e-mail using real names */
#define MM_EMAILSIG (1<<17) /* Include user signatures in e-mail msgs */
/* errormsg() codes */
#define ERR_OPEN "opening" /* opening a file */
......
......@@ -748,7 +748,7 @@ void msg_opts()
{
char str[128],*p;
static int msg_dflt;
int i,j;
int i,j,n;
while(1) {
i=0;
......@@ -792,6 +792,8 @@ void msg_opts()
,cfg.sys_misc&SM_DELREADM ? "Yes" : "No");
sprintf(opt[i++],"%-33.33s%s","Receive E-mail by Real Name"
,cfg.msg_misc&MM_REALNAME ? "Yes" : "No");
sprintf(opt[i++],"%-33.33s%s","Include Signatures in E-mail"
,cfg.msg_misc&MM_EMAILSIG ? "Yes" : "No");
sprintf(opt[i++],"%-33.33s%s","Users Can View Deleted Messages"
,cfg.sys_misc&SM_USRVDELM ? "Yes" : cfg.sys_misc&SM_SYSVDELM
? "Sysops Only":"No");
......@@ -1276,6 +1278,32 @@ addressed to a user's real name (rather than their alias).
}
break;
case 14:
n=(cfg.sub[i]->misc&MM_EMAILSIG) ? 0:1;
strcpy(opt[0],"Yes");
strcpy(opt[1],"No");
opt[2][0]=0;
SETHELP(WHERE);
/*
`Include User Signatures in E-mail:`
If you wish to have user signatures automatically appended to e-mail
messages, set this option to ~Yes~.
*/
n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
,"Include User Signatures in E-mail",opt);
if(n==-1)
break;
if(!n && !(cfg.msg_misc&MM_EMAILSIG)) {
uifc.changes=1;
cfg.msg_misc|=MM_EMAILSIG;
break;
}
if(n==1 && cfg.msg_misc&MM_EMAILSIG) {
uifc.changes=1;
cfg.msg_misc&=~MM_EMAILSIG;
}
break;
case 15:
strcpy(opt[0],"Yes");
strcpy(opt[1],"No");
strcpy(opt[2],"Sysops Only");
......@@ -1312,7 +1340,7 @@ appropriate) can view deleted messages.
cfg.sys_misc&=~SM_USRVDELM;
uifc.changes=1; }
break;
case 15:
case 16:
SETHELP(WHERE);
/*
Extra Attribute Codes...
......
......@@ -453,9 +453,9 @@ typedef struct
char sys_chat_arstr[LEN_ARSTR+1]; /* chat override */
uchar * sys_chat_ar;
int32_t msg_misc; /* Global Message-Related Settings */
int32_t msg_misc; /* Global Message-Related Settings (upper 16-bits default to on) */
int32_t file_misc; /* File Misc Settings */
int32_t xtrn_misc; /* External Programs Misc Settings */
int32_t xtrn_misc; /* External Programs Misc Settings */
char node_comspec[LEN_CMD+1]; /* DOS COMMAND.COM to use */
char node_editor[LEN_CMD+1]; /* Local text editor command line to use */
......
......@@ -513,7 +513,8 @@ bool sbbs_t::writemsg(const char *fname, const char *top, char *title, long mode
l=process_edited_text(buf,stream,mode,&lines);
/* Signature file */
if(subnum==INVALID_SUB || !(cfg.sub[subnum]->misc&SUB_NOUSERSIG)) {
if((subnum==INVALID_SUB && cfg.msg_misc&MM_EMAILSIG)
|| (subnum!=INVALID_SUB && !(cfg.sub[subnum]->misc&SUB_NOUSERSIG))) {
SAFEPRINTF2(str,"%suser/%04u.sig",cfg.data_dir,useron.number);
FILE* sig;
if(fexist(str) && (sig=fopen(str,"rb"))!=NULL) {
......
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