diff options
author | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-08-04 22:52:26 +0800 |
---|---|---|
committer | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-08-04 22:52:26 +0800 |
commit | 419fa9a1548e299cc41b26d9941cacc71947e2b5 (patch) | |
tree | b89733589c5e8ce1919ba253f67c8bca7070bb12 | |
parent | 646cf8fe635d1dcab6d17ecc851a6a07b627ec1c (diff) | |
download | pttbbs-419fa9a1548e299cc41b26d9941cacc71947e2b5.tar pttbbs-419fa9a1548e299cc41b26d9941cacc71947e2b5.tar.gz pttbbs-419fa9a1548e299cc41b26d9941cacc71947e2b5.tar.bz2 pttbbs-419fa9a1548e299cc41b26d9941cacc71947e2b5.tar.lz pttbbs-419fa9a1548e299cc41b26d9941cacc71947e2b5.tar.xz pttbbs-419fa9a1548e299cc41b26d9941cacc71947e2b5.tar.zst pttbbs-419fa9a1548e299cc41b26d9941cacc71947e2b5.zip |
post post ALLHIDPOST for hidden boards.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2979 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/bbs.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index d5b27122..2d59ca2e 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -479,7 +479,10 @@ do_crosspost(const char *brd, fileheader_t *postfile, const char *fpath) if(!strcmp(brd, "UnAnonymous")) strcpy(fh.owner, cuser.userid); else + { strcpy(fh.owner, postfile->owner); + fh.multi.money = postfile->multi.money; + } strcpy(fh.date, postfile->date); sprintf(fh.title,"%-*.*s.%sªO", len, len, postfile->title, currboard); unlink(genbuf); @@ -487,14 +490,9 @@ do_crosspost(const char *brd, fileheader_t *postfile, const char *fpath) postfile->filemode = FILE_LOCAL; setbdir(genbuf, brd); if (append_record(genbuf, &fh, sizeof(fileheader_t)) != -1) { - if(strcmp(brd, ALLPOST) == 0) - { - /* quick update */ - int bid = getbnum(ALLPOST); - touchbpostnum(bid, 1); - SHM->lastposttime[bid - 1] = now; - } else - touchbtotal(getbnum(brd)); + int bid = getbnum(brd); + SHM->lastposttime[bid - 1] = now; + touchbpostnum(bid, 1); } } static void @@ -738,9 +736,12 @@ do_general(int isbid) } brc_addlist(postfile.filename); - if (!(currbrdattr & BRD_HIDE) && - (!bp->level || (currbrdattr & BRD_POSTMASK))) { - do_crosspost(ALLPOST, &postfile, fpath); + if( !bp->level || (currbrdattr & BRD_POSTMASK)) + { + if (!(currbrdattr & BRD_HIDE) ) + do_crosspost(ALLPOST, &postfile, fpath); + else + do_crosspost(ALLHIDPOST, &postfile, fpath); } outs("¶¶§Q¶K¥X§G§i¡A"); @@ -2170,14 +2171,15 @@ del_post(int ent, fileheader_t * fhdr, char *direct) if (fhdr->multi.money < 0 || fhdr->filemode & FILE_ANONYMOUS) fhdr->multi.money = 0; if (not_owned && tusernum && fhdr->multi.money > 0 && - strcmp(currboard, "Test")) { + strcmp(currboard, "Test") && strcmp(currboard, ALLPOST)) { deumoney(tusernum, -fhdr->multi.money); #ifdef USE_COOLDOWN if (bp->brdattr & BRD_COOLDOWN) add_cooldowntime(tusernum, 15); #endif } - if (!not_owned && strcmp(currboard, "Test")) { + if (!not_owned && strcmp(currboard, "Test") && + strcmp(currboard, ALLPOST)) { if (cuser.numposts) cuser.numposts--; if (!(currmode & MODE_DIGEST && currmode & MODE_BOARD)){ |