From 1be57e7fccdabfe42518ecd9ec7f23c7bf0827f7 Mon Sep 17 00:00:00 2001 From: victor Date: Sat, 1 Nov 2003 17:53:24 +0000 Subject: dont dec badpost of a non-exist author git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1287 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/bbs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index 80a012c8..4a2fb231 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -1728,10 +1728,10 @@ del_post(int ent, fileheader_t * fhdr, char *direct) if (genbuf[0] == 'y') { strlcpy(currfile, fhdr->filename, sizeof(currfile)); if (!delete_file(direct, sizeof(fileheader_t), ent, cmpfilename)) { + int num; if (currmode & MODE_SELECT) { /* rocker.011018: 利用reference減低loading */ fileheader_t hdr; - int num; num = fhdr->money & ~FHR_REFERENCE; setbdir(genbuf, currboard); @@ -1749,11 +1749,12 @@ del_post(int ent, fileheader_t * fhdr, char *direct) cancelpost(fhdr, not_owned, newpath); #ifdef ASSESS - if (not_owned && currmode & MODE_DIGEST && is_BM(cuser.userid)) + num = searchuser(fhdr->owner); + if (not_owned && tmp > 0 && currmode & MODE_DIGEST && is_BM(cuser.userid)) { getdata(1, 40, "惡劣文章?(y/N)", genbuf, 3, LCECHO); if(genbuf[0]=='y') { - if (!(inc_badpost(searchuser(fhdr->owner), 1) % 10)){ + if (!(inc_badpost(num, 1) % 10)){ post_violatelaw(xuser.userid, "Ptt 系統警察", "劣文累計十篇", "罰單一張"); mail_violatelaw(xuser.userid, "Ptt 系統警察", "劣文累計十篇", "罰單一張"); xuser.userlevel |= PERM_VIOLATELAW; -- cgit v1.2.3