Commit c508455f authored by rswindell's avatar rswindell
Browse files

Created new sub_t misc bit, SUB_NOUSERSIG to disable user signatures.

parent bb2cdc31
......@@ -264,6 +264,7 @@
#define SUB_HYPER (1L<<27) /* Hyper allocation */
#define SUB_EDIT (1L<<28) /* Users can edit message text after posting */
#define SUB_EDITLAST (1L<<29) /* Users can edit last message only */
#define SUB_NOUSERSIG (1L<<30) /* Suppress user signatures */
#define SUB_HDRMOD (1L<<31) /* Modified sub-board header info (SCFG) */
/* Bit values for dir[x].misc */
......
......@@ -404,17 +404,19 @@ bool sbbs_t::writemsg(char *fname, char *top, char *title, long mode, int subnum
bputs(text[NoMoreLines]);
/* Signature file */
sprintf(str,"%suser/%04u.sig",cfg.data_dir,useron.number);
FILE* sig;
if(!(mode&WM_EXTDESC) && fexist(str) && (sig=fopen(str,"rb"))!=NULL) {
while(!feof(sig)) {
if(!fgets(str,sizeof(str)-1,sig))
break;
fputs(str,stream);
l+=strlen(str); /* byte counter */
i++; /* line counter */
if(subnum==INVALID_SUB || !(cfg.sub[subnum]->misc&SUB_NOUSERSIG)) {
sprintf(str,"%suser/%04u.sig",cfg.data_dir,useron.number);
FILE* sig;
if(fexist(str) && (sig=fopen(str,"rb"))!=NULL) {
while(!feof(sig)) {
if(!fgets(str,sizeof(str)-1,sig))
break;
fputs(str,stream);
l+=strlen(str); /* byte counter */
i++; /* line counter */
}
fclose(sig);
}
fclose(sig);
}
fclose(stream);
......
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