diff options
author | victor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-10-16 15:05:44 +0800 |
---|---|---|
committer | victor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-10-16 15:05:44 +0800 |
commit | 1b3798bd300369ea0c2114a262df961910e5ca6f (patch) | |
tree | 365b459ce064c1d24f05e8708c8892ba59102943 /mbbsd/bbs.c | |
parent | 230e45e1120bcb065dc5abca6bceb16ca1266b73 (diff) | |
download | pttbbs-1b3798bd300369ea0c2114a262df961910e5ca6f.tar pttbbs-1b3798bd300369ea0c2114a262df961910e5ca6f.tar.gz pttbbs-1b3798bd300369ea0c2114a262df961910e5ca6f.tar.bz2 pttbbs-1b3798bd300369ea0c2114a262df961910e5ca6f.tar.lz pttbbs-1b3798bd300369ea0c2114a262df961910e5ca6f.tar.xz pttbbs-1b3798bd300369ea0c2114a262df961910e5ca6f.tar.zst pttbbs-1b3798bd300369ea0c2114a262df961910e5ca6f.zip |
completed assess
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1251 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/bbs.c')
-rw-r--r-- | mbbsd/bbs.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index 3ed870ed..eb4c627d 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -1417,10 +1417,10 @@ do_bid(int ent, fileheader_t * fhdr, boardheader_t *bp, char *direct, struct t if ('1' <= tmp && tmp <= '3'){ switch(tmp){ case 1: - inc_goodsale(currutmp->uid); + inc_goodsale(currutmp->uid, 1); break; case 2: - inc_badpost(currutmp->uid); + inc_badpost(currutmp->uid, 1); break; } bidinfo.flag |= SALE_COMMENTED; @@ -1581,7 +1581,7 @@ recommend(int ent, fileheader_t * fhdr, char *direct) do_add_recommend(direct, fhdr, ent, buf); /* 每 10 次推文 加一次 goodpost */ if ((fhdr->filemode & FILE_MARKED) && fhdr->recommend % 10 == 0) - inc_goodpost(searchuser(fhdr->owner)); + inc_goodpost(searchuser(fhdr->owner), 1); lastrecommend = now; return FULLUPDATE; } @@ -1601,6 +1601,12 @@ mark_post(int ent, fileheader_t * fhdr, char *direct) return DONOTHING; fhdr->filemode ^= FILE_MARKED; + + if (fhdr->filemode) + inc_goodpost(searchuser(fhdr->owner), fhdr->recommend); + else + inc_badpost(searchuser(fhdr->owner), fhdr->recommend); + substitute_record(direct, fhdr, sizeof(*fhdr), ent); substitute_check(fhdr); touchdircache(currbid); @@ -1726,7 +1732,7 @@ del_post(int ent, fileheader_t * fhdr, char *direct) delete_file(genbuf, sizeof(fileheader_t), num, cmpfilename); } if (not_owned) - inc_badpost(searchuser(fhdr->owner)); + inc_badpost(searchuser(fhdr->owner), 1); cancelpost(fhdr, not_owned); setbtotal(currbid); |