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

Added text.dat entry: ValidatePostQ

Added prompts for sub-board operators/sysops, after reading an unvalidated
moderated messages to validate or delete the message.
parent b90331e3
No related branches found
No related tags found
No related merge requests found
......@@ -636,6 +636,37 @@ int sbbs_t::scanposts(uint subnum, long mode, const char *find)
posts_read++;
subscan[subnum].ptr=post[smb.curmsg].number;
}
if(sub_op(subnum) && (msg.idx.attr&(MSG_MODERATED|MSG_VALIDATED)) == MSG_MODERATED) {
SAFEPRINTF2(str,text[ValidatePostQ],msg.hdr.number,msg.subj);
if(!noyes(str))
msg.idx.attr|=MSG_VALIDATED;
else {
SAFEPRINTF2(str,text[DeletePostQ],msg.hdr.number,msg.subj);
if(yesno(str))
msg.idx.attr|=MSG_DELETE;
}
if(msg.idx.attr!=msg.hdr.attr) {
if(msg.total_hfields)
smb_freemsgmem(&msg);
msg.total_hfields=0;
msg.idx.offset=0;
if(!smb_locksmbhdr(&smb)) { /* Lock the entire base */
if(loadmsg(&msg,msg.idx.number)) {
msg.hdr.attr=msg.idx.attr;
if((i=smb_putmsg(&smb,&msg))!=0)
errormsg(WHERE,ERR_WRITE,smb.file,i,smb.last_error);
smb_unlockmsghdr(&smb,&msg);
}
smb_unlocksmbhdr(&smb);
}
if(!msg.total_hfields) { /* unsuccessful reload */
domsg=0;
continue;
}
}
}
}
else domsg=1;
if(mode&SCAN_CONST) {
......
......@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2008 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 2009 Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
......@@ -772,6 +772,7 @@ enum {
,ExternalEditorHeading
,CommandShellHeading
,ArchiveTypeHeading
,ValidatePostQ
,TOTAL_TEXT
};
......
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