summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-06-28 00:35:32 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-06-28 00:35:32 +0800
commitc52d9652d75e3f71875c0c9b11e9d133c6470e99 (patch)
tree0e832c7e95b13c3ec1ba3440dc624723416bec00
parentc9d19bf7171b76df5dc932f2ec042ac5d3f63a54 (diff)
downloadpttbbs-c52d9652d75e3f71875c0c9b11e9d133c6470e99.tar
pttbbs-c52d9652d75e3f71875c0c9b11e9d133c6470e99.tar.gz
pttbbs-c52d9652d75e3f71875c0c9b11e9d133c6470e99.tar.bz2
pttbbs-c52d9652d75e3f71875c0c9b11e9d133c6470e99.tar.lz
pttbbs-c52d9652d75e3f71875c0c9b11e9d133c6470e99.tar.xz
pttbbs-c52d9652d75e3f71875c0c9b11e9d133c6470e99.tar.zst
pttbbs-c52d9652d75e3f71875c0c9b11e9d133c6470e99.zip
* refine badpost assignment error messages again
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4705 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/bbs.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index a7c944e2..0b204356 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -3224,27 +3224,32 @@ del_post(int ent, fileheader_t * fhdr, char *direct)
#ifdef ASSESS
#define SIZE sizeof(badpost_reason) / sizeof(char *)
- // case one, owned or digest - should not give bad posts
+ // badpost assignment
+
+ // case one, self-owned, invalid author, or digest mode - should not give bad posts
if (!not_owned || tusernum <= 0 || (currmode & MODE_DIGEST) )
{
// do nothing
}
- // case 2, not owned but cannot delete (also skip badpost)
+ // case 2, got error in file deletion (already deleted, also skip badpost)
else if (!del_ok)
{
move(1, 40); clrtoeol();
outs("此檔已被別人刪除(跳過劣文設定)");
pressanykey();
}
- // case 3, not owned and deleted, can assign badpost
+ // case 3, post older than one week (TODO use macro for the duration)
+ else if (now - atoi(fhdr->filename + 2) > 7 * 24 * 60 * 60)
+ {
+ move(1, 40); clrtoeol();
+ outs("文章超過一週(跳過劣文設定)");
+ pressanykey();
+ }
+ // case 4, can assign badpost
else
{
// TODO not_owned 時也要改變 numpost?
- 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);
+ getdata(1, 40, "惡劣文章?(y/N)", genbuf, 3, LCECHO);
if (genbuf[0]=='y') {
int i;