diff options
author | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-11-11 21:15:54 +0800 |
---|---|---|
committer | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-11-11 21:15:54 +0800 |
commit | bc1ce935662b1cbc34defc7c97becf14c875f23d (patch) | |
tree | 2055b5effff958a4b512d082d5c5d19b0b45d213 /mbbsd/bbs.c | |
parent | 43d8bd219372ba0a7a081563acaa21b96e9265f2 (diff) | |
download | pttbbs-bc1ce935662b1cbc34defc7c97becf14c875f23d.tar pttbbs-bc1ce935662b1cbc34defc7c97becf14c875f23d.tar.gz pttbbs-bc1ce935662b1cbc34defc7c97becf14c875f23d.tar.bz2 pttbbs-bc1ce935662b1cbc34defc7c97becf14c875f23d.tar.lz pttbbs-bc1ce935662b1cbc34defc7c97becf14c875f23d.tar.xz pttbbs-bc1ce935662b1cbc34defc7c97becf14c875f23d.tar.zst pttbbs-bc1ce935662b1cbc34defc7c97becf14c875f23d.zip |
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1314 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/bbs.c')
-rw-r--r-- | mbbsd/bbs.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index e63a4120..57bdde9d 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -735,21 +735,25 @@ do_post() boardheader_t *bp; bp = getbcache(currbid); if (bp->brdattr & BRD_VOTEBOARD) - return do_voteboard(); + return do_voteboard(0); else if (!(bp->brdattr & BRD_GROUPBOARD)) return do_general(0); - touchdircache(currbid); return 0; } int +do_post_vote() +{ + return do_voteboard(1); +} + +int do_post_openbid() { boardheader_t *bp; bp = getbcache(currbid); if (!(bp->brdattr & BRD_VOTEBOARD)) return do_general(1); - touchdircache(currbid); return 0; } @@ -830,7 +834,7 @@ do_reply(fileheader_t * fhdr) { boardheader_t *bp; bp = getbcache(currbid); - if (bp->brdattr & BRD_VOTEBOARD) + if (bp->brdattr & BRD_VOTEBOARD || (fhdr->filemode & FILE_VOTE)) do_voteboardreply(fhdr); else do_generalboardreply(fhdr); @@ -860,7 +864,7 @@ edit_post(int ent, fileheader_t * fhdr, char *direct) if (strcmp(bp->brdname, "Security") == 0) return DONOTHING; - if (!HAS_PERM(PERM_SYSOP) && (bp->brdattr & BRD_VOTEBOARD)) + if (!HAS_PERM(PERM_SYSOP) && ((bp->brdattr & BRD_VOTEBOARD) || fhdr->filemode & FILE_VOTE)) return DONOTHING; if ((!HAS_PERM(PERM_SYSOP)) && @@ -942,7 +946,7 @@ cross_post(int ent, fileheader_t * fhdr, char *direct) clrtoeol(); move(1, 0); bp = getbcache(currbid); - if (bp && (bp->brdattr & BRD_VOTEBOARD)) + if (bp && (bp->brdattr & BRD_VOTEBOARD) ) return FULLUPDATE; generalnamecomplete("轉錄本文章於看板:", xboard, sizeof(xboard), SHM->Bnumber, @@ -1547,7 +1551,7 @@ recommend(int ent, fileheader_t * fhdr, char *direct) vmsg("抱歉, 本板禁止推薦或競標"); return FULLUPDATE; } - if (!(currmode & MODE_POST) || bp->brdattr & BRD_VOTEBOARD) { + if (!(currmode & MODE_POST) || bp->brdattr & BRD_VOTEBOARD || fhdr->filemode & FILE_VOTE) { vmsg("您因權限不足!"); return FULLUPDATE; } @@ -2416,6 +2420,7 @@ struct onekey_t read_comms[] = { {'z', b_man}, {Ctrl('P'), do_post}, {Ctrl('O'), do_post_openbid}, + {Ctrl('V'), do_post_vote}, {Ctrl('W'), whereami}, {'\0', NULL} }; |