Skip to content
Snippets Groups Projects
Commit c508455f authored by rswindell's avatar rswindell
Browse files

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

parent bb2cdc31
No related branches found
No related tags found
No related merge requests found
...@@ -264,6 +264,7 @@ ...@@ -264,6 +264,7 @@
#define SUB_HYPER (1L<<27) /* Hyper allocation */ #define SUB_HYPER (1L<<27) /* Hyper allocation */
#define SUB_EDIT (1L<<28) /* Users can edit message text after posting */ #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_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) */ #define SUB_HDRMOD (1L<<31) /* Modified sub-board header info (SCFG) */
/* Bit values for dir[x].misc */ /* Bit values for dir[x].misc */
......
...@@ -404,17 +404,19 @@ bool sbbs_t::writemsg(char *fname, char *top, char *title, long mode, int subnum ...@@ -404,17 +404,19 @@ bool sbbs_t::writemsg(char *fname, char *top, char *title, long mode, int subnum
bputs(text[NoMoreLines]); bputs(text[NoMoreLines]);
/* Signature file */ /* Signature file */
sprintf(str,"%suser/%04u.sig",cfg.data_dir,useron.number); if(subnum==INVALID_SUB || !(cfg.sub[subnum]->misc&SUB_NOUSERSIG)) {
FILE* sig; sprintf(str,"%suser/%04u.sig",cfg.data_dir,useron.number);
if(!(mode&WM_EXTDESC) && fexist(str) && (sig=fopen(str,"rb"))!=NULL) { FILE* sig;
while(!feof(sig)) { if(fexist(str) && (sig=fopen(str,"rb"))!=NULL) {
if(!fgets(str,sizeof(str)-1,sig)) while(!feof(sig)) {
break; if(!fgets(str,sizeof(str)-1,sig))
fputs(str,stream); break;
l+=strlen(str); /* byte counter */ fputs(str,stream);
i++; /* line counter */ l+=strlen(str); /* byte counter */
i++; /* line counter */
}
fclose(sig);
} }
fclose(sig);
} }
fclose(stream); fclose(stream);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment