summaryrefslogtreecommitdiffstats
path: root/mbbsd/bbs.c
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-08-04 22:13:02 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-08-04 22:13:02 +0800
commit4f371a15c597440cacdd0b815294707ad824f22b (patch)
treed1f6ab71c4685354802701de285e2d760bc4e978 /mbbsd/bbs.c
parentf514f537625817bee4cdc55a5c9374c39855042a (diff)
downloadpttbbs-4f371a15c597440cacdd0b815294707ad824f22b.tar
pttbbs-4f371a15c597440cacdd0b815294707ad824f22b.tar.gz
pttbbs-4f371a15c597440cacdd0b815294707ad824f22b.tar.bz2
pttbbs-4f371a15c597440cacdd0b815294707ad824f22b.tar.lz
pttbbs-4f371a15c597440cacdd0b815294707ad824f22b.tar.xz
pttbbs-4f371a15c597440cacdd0b815294707ad824f22b.tar.zst
pttbbs-4f371a15c597440cacdd0b815294707ad824f22b.zip
debug goodpost & bad post
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2157 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/bbs.c')
-rw-r--r--mbbsd/bbs.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index 301fbaf3..fcde90b4 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -1312,7 +1312,7 @@ recommend_cancel(int ent, fileheader_t * fhdr, char *direct)
#ifdef ASSESS
// to save resource
if (fhdr->recommend > 9)
- inc_goodpost(searchuser(fhdr->owner), -1 * (fhdr->recommend / 10));
+ inc_goodpost(fhdr->owner, -1 * (fhdr->recommend / 10));
#endif
fhdr->recommend = 0;
@@ -1397,10 +1397,10 @@ do_bid(int ent, fileheader_t * fhdr, boardheader_t *bp,
if ('1' <= tmp && tmp <= '3'){
switch(tmp){
case 1:
- inc_goodsale(currutmp->uid, 1);
+ inc_goodsale(bidinfo.userid, 1);
break;
case 2:
- inc_badpost(currutmp->uid, 1);
+ inc_badpost(bidinfo.userid, 1);
break;
}
bidinfo.flag |= SALE_COMMENTED;
@@ -1586,10 +1586,8 @@ recommend(int ent, fileheader_t * fhdr, char *direct)
#ifdef ASSESS
/* 每 10 次推文 加一次 goodpost */
if (type ==0 && (fhdr->filemode & FILE_MARKED) && fhdr->recommend % 10 == 0) {
- int uid = searchuser(fhdr->owner);
- if (uid > 0)
- inc_goodpost(uid, 1);
- }
+ inc_goodpost(fdhr->owner, 1);
+ }
#endif
lastrecommend = now;
return FULLUPDATE;
@@ -1616,10 +1614,10 @@ mark_post(int ent, fileheader_t * fhdr, char *direct)
if (!(fhdr->filemode & FILE_BID)){
if (fhdr->filemode & FILE_MARKED) {
if (!(currbrdattr & BRD_BAD) && fhdr->recommend >= 10)
- inc_goodpost(searchuser(fhdr->owner), fhdr->recommend / 10);
+ inc_goodpost(fhdr->owner, fhdr->recommend / 10);
}
else if (fhdr->recommend > 9)
- inc_goodpost(searchuser(fhdr->owner), -1 * (fhdr->recommend / 10));
+ inc_goodpost(fhdr->owner, -1 * (fhdr->recommend / 10));
}
#endif
@@ -1746,7 +1744,7 @@ del_post(int ent, fileheader_t * fhdr, char *direct)
getdata(b_lines, 0, "請輸入原因", reason, sizeof(reason), DOECHO);
else
strcpy(reason, badpost_reason[i - 1]);
- if (!(inc_badpost(num, 1) % 10)){
+ if (!(inc_badpost(xuser.userid, 1) % 10)){
post_violatelaw(xuser.userid, "Ptt 系統警察", "劣文累計十篇", "罰單一張");
mail_violatelaw(xuser.userid, "Ptt 系統警察", "劣文累計十篇", "罰單一張");
xuser.userlevel |= PERM_VIOLATELAW;