diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2007-12-16 16:16:38 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2007-12-16 16:16:38 +0800 |
commit | 1b162d305b32d23c79f7d483344167f86c2a7f59 (patch) | |
tree | c28eb082e20dc378e4197d108a58dacaecb6a261 /mbbsd/bbs.c | |
parent | 4a3e36dfe65197a898ae9bf9c328a483dfffbc18 (diff) | |
download | pttbbs-1b162d305b32d23c79f7d483344167f86c2a7f59.tar pttbbs-1b162d305b32d23c79f7d483344167f86c2a7f59.tar.gz pttbbs-1b162d305b32d23c79f7d483344167f86c2a7f59.tar.bz2 pttbbs-1b162d305b32d23c79f7d483344167f86c2a7f59.tar.lz pttbbs-1b162d305b32d23c79f7d483344167f86c2a7f59.tar.xz pttbbs-1b162d305b32d23c79f7d483344167f86c2a7f59.tar.zst pttbbs-1b162d305b32d23c79f7d483344167f86c2a7f59.zip |
- fix bug "good post dropped if user online"
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3693 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/bbs.c')
-rw-r--r-- | mbbsd/bbs.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index 784ca75c..2d068841 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -2329,7 +2329,10 @@ recommend_cancel(int ent, fileheader_t * fhdr, const char *direct) #ifdef ASSESS // to save resource if (fhdr->recommend > 9) + { inc_goodpost(fhdr->owner, -1 * (fhdr->recommend / 10)); + sendalert(fhdr->owner, ALERT_PWD_GOODPOST); + } #endif fhdr->recommend = 0; @@ -2859,7 +2862,10 @@ recommend(int ent, fileheader_t * fhdr, const char *direct) #ifdef ASSESS /* 每 10 次推文 加一次 goodpost */ if (type ==0 && (fhdr->filemode & FILE_MARKED) && fhdr->recommend % 10 == 0) + { inc_goodpost(fhdr->owner, 1); + sendalert(fhdr->owner, ALERT_PWD_GOODPOST); + } #endif lastrecommend = now; @@ -2889,10 +2895,16 @@ mark_post(int ent, fileheader_t * fhdr, const char *direct) if (!(fhdr->filemode & FILE_BID)){ if (fhdr->filemode & FILE_MARKED) { if (!(currbrdattr & BRD_BAD) && fhdr->recommend >= 10) + { inc_goodpost(fhdr->owner, fhdr->recommend / 10); + sendalert(fhdr->owner, ALERT_PWD_GOODPOST); + } } else if (fhdr->recommend > 9) + { inc_goodpost(fhdr->owner, -1 * (fhdr->recommend / 10)); + sendalert(fhdr->owner, ALERT_PWD_GOODPOST); + } } #endif |