From a3d91e5925766fd6e0a76ff8bbf2c3edded012c0 Mon Sep 17 00:00:00 2001 From: victor Date: Tue, 2 Dec 2003 09:44:25 +0000 Subject: add more condition for saving resource git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1390 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/bbs.c | 10 ++++++---- 1 file 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 -- cgit v1.2.3