summaryrefslogtreecommitdiffstats
path: root/mbbsd/bbs.c
diff options
context:
space:
mode:
authorscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-12-14 21:43:28 +0800
committerscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-12-14 21:43:28 +0800
commit58f876da2d247c7c19d033e7e873844d45603d3b (patch)
tree28bc3b784654749faa31a05dc80a966bcf8c01f7 /mbbsd/bbs.c
parentabdd055a365bc6b5a19cdbfeec90f0f92731cb63 (diff)
downloadpttbbs-58f876da2d247c7c19d033e7e873844d45603d3b.tar
pttbbs-58f876da2d247c7c19d033e7e873844d45603d3b.tar.gz
pttbbs-58f876da2d247c7c19d033e7e873844d45603d3b.tar.bz2
pttbbs-58f876da2d247c7c19d033e7e873844d45603d3b.tar.lz
pttbbs-58f876da2d247c7c19d033e7e873844d45603d3b.tar.xz
pttbbs-58f876da2d247c7c19d033e7e873844d45603d3b.tar.zst
pttbbs-58f876da2d247c7c19d033e7e873844d45603d3b.zip
* recording bad post judgement made by BM on board
defined by BAD_POST_RECORD * post older than a week cannot be made bad post git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3254 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/bbs.c')
-rw-r--r--mbbsd/bbs.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index 082bfecf..8126f3b1 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -2439,8 +2439,13 @@ del_post(int ent, fileheader_t * fhdr, char *direct)
#define SIZE sizeof(badpost_reason) / sizeof(char *)
if (not_owned && tusernum > 0 && !(currmode & MODE_DIGEST)) {
- getdata(1, 40, "惡劣文章?(y/N)", genbuf, 3, LCECHO);
- if(genbuf[0]=='y') {
+ if (now - atoi(fhdr->filename + 2) > 7 * 24 * 60 * 60)
+ /* post older than a week */
+ genbuf[0] = 'n';
+ else
+ getdata(1, 40, "惡劣文章?(y/N)", genbuf, 3, LCECHO);
+
+ if (genbuf[0]=='y') {
int i;
char *userid=getuserid(tusernum);
move(b_lines - 2, 0);
@@ -2479,6 +2484,23 @@ del_post(int ent, fileheader_t * fhdr, char *direct)
passwd_update(tusernum, &xuser);
}
mail_id(userid, genbuf, newpath, cuser.userid);
+
+#ifdef BAD_POST_RECORD
+ {
+ fileheader_t report_fh;
+ char report_path[PATHLEN];
+ setbpath(report_path, BAD_POST_RECORD);
+ stampfile(report_path, &report_fh);
+
+ snprintf(report_fh.title, sizeof(report_fh.title),
+ "%s 板 %s 板主給予 %s 一篇劣文",
+ currboard, cuser.userid, userid);
+ Copy(newpath, report_path);
+
+ setbdir(report_path, BAD_POST_RECORD);
+ append_record(report_path, &report_fh, sizeof(report_fh));
+ }
+#endif /* defined(BAD_POST_RECORD) */
}
}
}