diff options
-rw-r--r-- | include/pttstruct.h | 1 | ||||
-rw-r--r-- | mbbsd/bbs.c | 17 |
2 files changed, 17 insertions, 1 deletions
diff --git a/include/pttstruct.h b/include/pttstruct.h index 8b6d6c97..6ee1d3ee 100644 --- a/include/pttstruct.h +++ b/include/pttstruct.h @@ -228,6 +228,7 @@ typedef struct boardheader_t { #define BRD_NOFASTRECMD 0020000000 /* 禁止快速推文 */ #define BRD_IPLOGRECMD 0040000000 /* 推文記錄 IP */ #define BRD_OVER18 0100000000 /* 十八禁 */ +#define BRD_NOREPLY 0200000000 /* 不可回文 */ #define BRD_LINK_TARGET(x) ((x)->postexpire) #define GROUPOP() (currmode & MODE_GROUPOP) diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index 7f773701..9bc5d51c 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -1117,6 +1117,11 @@ do_reply(/*const*/ fileheader_t * fhdr) assert(0<=currbid-1 && currbid-1<MAX_BOARD); bp = getbcache(currbid); + if (bp->brdattr & BRD_NOREPLY) { + vmsg("很抱歉, 本板不開放回覆文章."); + return FULLUPDATE; + } + setbfile(quote_file, bp->brdname, fhdr->filename); if (bp->brdattr & BRD_VOTEBOARD || (fhdr->filemode & FILE_VOTE)) do_voteboardreply(fhdr); @@ -2992,7 +2997,7 @@ b_config(void) bp = getbcache(currbid); while(!finished) { - move(b_lines - 13, 0); clrtobot(); + move(b_lines - 14, 0); clrtobot(); outs(MSG_SEPERATOR); prints("\n目前 %s 看板設定:\n", bp->brdname); @@ -3063,6 +3068,11 @@ b_config(void) " 進入", (bp->brdattr & BRD_OVER18) ? "不可以" : "可以" ); + prints( " " ANSI_COLOR(1;36) "y" ANSI_RESET + " - " ANSI_COLOR(1) "%s" ANSI_RESET + " 回文", + (bp->brdattr & BRD_NOREPLY) ? "不可以" : "可以" ); + if (!((currmode & MODE_BOARD) || HasUserPerm(PERM_SYSOP))) { vmsg("您對此板無管理權限"); @@ -3165,6 +3175,11 @@ b_config(void) touched = 1; break; + case 'y': + bp->brdattr ^= BRD_NOREPLY; + touched = 1; + break; + default: finished = 1; break; |