From 8ace171c5c279b69e105a76a27f33d144a6e6db0 Mon Sep 17 00:00:00 2001 From: ptt Date: Tue, 28 Oct 2003 14:13:40 +0000 Subject: git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1270 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/assess.c | 6 ++++++ mbbsd/bbs.c | 17 ++++++++++++----- mbbsd/talk.c | 2 +- mbbsd/user.c | 2 +- 4 files changed, 20 insertions(+), 7 deletions(-) (limited to 'mbbsd') diff --git a/mbbsd/assess.c b/mbbsd/assess.c index 282af895..707e221e 100644 --- a/mbbsd/assess.c +++ b/mbbsd/assess.c @@ -24,6 +24,12 @@ void inc_badpost(int uid, int num) { passwd_query(uid, &xuser); inc(&xuser.badpost, num); + if(!(xuser.badpost % 10)) + { + post_violatelaw(xcuser.userid, "Ptt 系統警察", "劣文累計十篇", "罰單一張"); + mail_violatelaw(xcuser.userid, "Ptt 系統警察", "劣文累計十篇", "罰單一張"); + xcuser.userlevel |= PERM_VIOLATELAW; + } passwd_update(uid, &xuser); } diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index 759f8379..b28524fe 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -679,13 +679,15 @@ do_general(int isbid) #endif if (strcmp(currboard, "Test") && !ifuseanony) { prints("這是您的第 %d 篇文章。",++cuser.numposts); - if(!(postfile.filemode&FILE_BID)) + if(postfile.filemode&FILE_BID) + prints("招標文章沒有稿酬。"); + else if(currbrdattr&BRD_BAD) + prints("違法改進中看板沒有稿酬。"); + else { prints(" 稿酬 %d 銀。",aborted); demoney(aborted); } - else - prints("招標文章沒有稿酬。"); passwd_update(usernum, &cuser); /* post 數 */ } else outs("測試信件不列入紀錄,敬請包涵。"); @@ -1612,7 +1614,8 @@ mark_post(int ent, fileheader_t * fhdr, char *direct) #ifdef ASSESS if (!(fhdr->filemode & FILE_BID)){ if (fhdr->filemode & FILE_MARKED) - inc_goodpost(searchuser(fhdr->owner), fhdr->recommend / 10); + if(!(currbrdattr&BRD_BAD)) + inc_goodpost(searchuser(fhdr->owner), fhdr->recommend / 10); else inc_goodpost(searchuser(fhdr->owner), -1 * (fhdr->recommend / 10)); } @@ -1744,7 +1747,11 @@ del_post(int ent, fileheader_t * fhdr, char *direct) } #ifdef ASSESS if (not_owned) - inc_badpost(searchuser(fhdr->owner), 1); + { + getdata(1, 40, "惡劣文章?(y/N)", genbuf, 3, LCECHO); + if(genbuf[0]=='y') + inc_badpost(searchuser(fhdr->owner), 1); + } #endif cancelpost(fhdr, not_owned); diff --git a/mbbsd/talk.c b/mbbsd/talk.c index fd134126..84728632 100644 --- a/mbbsd/talk.c +++ b/mbbsd/talk.c @@ -364,7 +364,7 @@ my_query(char *uident) prints("《上站次數》%d次", muser.numlogins); move(2, 40); #ifdef ASSESS - prints("《文章篇數》%d篇 (佳作%d/劣文%d)\n", muser.numposts, muser.goodpost, muser.badpost); + prints("《文章篇數》%d篇 (優:%d/劣:%d)\n", muser.numposts, muser.goodpost, muser.badpost); #else prints("《文章篇數》%d篇\n", muser.numposts); #endif diff --git a/mbbsd/user.c b/mbbsd/user.c index c3e63595..16303938 100644 --- a/mbbsd/user.c +++ b/mbbsd/user.c @@ -386,7 +386,7 @@ uinfo_query(userec_t * u, int real, int unum) } } snprintf(genbuf, sizeof(genbuf), "%d", x.exmailbox); - if (getdata_str(i++, 0, "購買信箱數:", buf, sizeof(buf), + if (getdata_str(i++, 0, "購買信箱數:", buf, 6, DOECHO, genbuf)) if ((l = atol(buf)) != 0) x.exmailbox = (int)l; -- cgit v1.2.3