diff options
author | victor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-12-02 17:44:25 +0800 |
---|---|---|
committer | victor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-12-02 17:44:25 +0800 |
commit | a3d91e5925766fd6e0a76ff8bbf2c3edded012c0 (patch) | |
tree | f85c56960c8119de562a98267601a3899baaa8fe | |
parent | 0bc094e344f98f43685082c9e3ab1271537c71f5 (diff) | |
download | pttbbs-a3d91e5925766fd6e0a76ff8bbf2c3edded012c0.tar pttbbs-a3d91e5925766fd6e0a76ff8bbf2c3edded012c0.tar.gz pttbbs-a3d91e5925766fd6e0a76ff8bbf2c3edded012c0.tar.bz2 pttbbs-a3d91e5925766fd6e0a76ff8bbf2c3edded012c0.tar.lz pttbbs-a3d91e5925766fd6e0a76ff8bbf2c3edded012c0.tar.xz pttbbs-a3d91e5925766fd6e0a76ff8bbf2c3edded012c0.tar.zst pttbbs-a3d91e5925766fd6e0a76ff8bbf2c3edded012c0.zip |
add more condition for saving resource
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1390 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/bbs.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index 3f1744f3..5e479266 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -1443,7 +1443,9 @@ recommend_cancel(int ent, fileheader_t * fhdr, char *direct) if (yn[0] != 'y') return FULLUPDATE; #ifdef ASSESS - inc_goodpost(searchuser(fhdr->owner), -1 * (fhdr->recommend / 10)); + // to save resource + if (fhdr->recommend > 9) + inc_goodpost(searchuser(fhdr->owner), -1 * (fhdr->recommend / 10)); #endif fhdr->recommend = 0; @@ -1694,11 +1696,11 @@ mark_post(int ent, fileheader_t * fhdr, char *direct) #ifdef ASSESS if (!(fhdr->filemode & FILE_BID)){ if (fhdr->filemode & FILE_MARKED) { - if (!(currbrdattr & BRD_BAD)) + if (!(currbrdattr & BRD_BAD) && fhdr->recommend > 10) inc_goodpost(searchuser(fhdr->owner), fhdr->recommend / 10); } - else - inc_goodpost(searchuser(fhdr->owner), -1 * (fhdr->recommend / 10)); + else if (fhdr->recommend > 9) + inc_goodpost(searchuser(fhdr->owner), -1 * (fhdr->ecommend / 10)); } #endif |