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
commit9e8fcaa18fd12dc07c641899d4617fc527d16963 (patch)
treeb31ee335720bd3b7e32c35d9b7b9dc8b3eb309bc
parentc50f40ce7ae28eaa2034ae0fbb47c2d392e39f3e (diff)
downloadpttbbs-9e8fcaa18fd12dc07c641899d4617fc527d16963.tar
pttbbs-9e8fcaa18fd12dc07c641899d4617fc527d16963.tar.gz
pttbbs-9e8fcaa18fd12dc07c641899d4617fc527d16963.tar.bz2
pttbbs-9e8fcaa18fd12dc07c641899d4617fc527d16963.tar.lz
pttbbs-9e8fcaa18fd12dc07c641899d4617fc527d16963.tar.xz
pttbbs-9e8fcaa18fd12dc07c641899d4617fc527d16963.tar.zst
pttbbs-9e8fcaa18fd12dc07c641899d4617fc527d16963.zip
* refine badpost assignment error messages again
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@4705 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/mbbsd/bbs.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/pttbbs/mbbsd/bbs.c b/pttbbs/mbbsd/bbs.c
index a7c944e2..0b204356 100644
--- a/pttbbs/mbbsd/bbs.c
+++ b/pttbbs/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;