diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2007-12-16 14:22:48 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2007-12-16 14:22:48 +0800 |
commit | ac3db4abeaa7de99e29480d3e9f103e4d14a465d (patch) | |
tree | d8d43df091a55deb297e7e711edf76bc770917aa /mbbsd/board.c | |
parent | 5a901f172ecacd3914cd473667cbd4dc10b8445a (diff) | |
download | pttbbs-ac3db4abeaa7de99e29480d3e9f103e4d14a465d.tar pttbbs-ac3db4abeaa7de99e29480d3e9f103e4d14a465d.tar.gz pttbbs-ac3db4abeaa7de99e29480d3e9f103e4d14a465d.tar.bz2 pttbbs-ac3db4abeaa7de99e29480d3e9f103e4d14a465d.tar.lz pttbbs-ac3db4abeaa7de99e29480d3e9f103e4d14a465d.tar.xz pttbbs-ac3db4abeaa7de99e29480d3e9f103e4d14a465d.tar.zst pttbbs-ac3db4abeaa7de99e29480d3e9f103e4d14a465d.zip |
general message fix:
- report board postmask info in b_config
- reduce message bar for pager status
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3690 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/board.c')
-rw-r--r-- | mbbsd/board.c | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/mbbsd/board.c b/mbbsd/board.c index b6278432..0a6d6234 100644 --- a/mbbsd/board.c +++ b/mbbsd/board.c @@ -183,13 +183,17 @@ b_config(void) boardheader_t *bp=NULL; int touched = 0, finished = 0; bp = getbcache(currbid); - int i = 0, attr = 0; + int i = 0, attr = 0, ipostres; + +#define LNBOARDINFO (15) +#define LNPOSTRES (10) +#define COLPOSTRES (50) const int ytitle = b_lines - #ifndef OLDRECOMMEND - 16; + LNBOARDINFO+1; #else // OLDRECOMMEND - 15; + LNBOARDINFO; #endif // OLDRECOMMEND grayout_lines(0, ytitle-1, 0); @@ -289,27 +293,28 @@ b_config(void) (bp->brdattr & BRD_RESTRICTEDPOST) ? ANSI_COLOR(1)"只有板友才可發文" : "無特別設定" ); - move_ansi(b_lines - 10, 52); + ipostres = b_lines - LNPOSTRES; + move_ansi(ipostres++, COLPOSTRES-2); prints("發文限制"); #define POSTRESTRICTION(msg,utag) \ prints(msg, attr ? ANSI_COLOR(1) : "", i, attr ? ANSI_RESET : "") - move_ansi(b_lines - 9, 54); + move_ansi(ipostres++, COLPOSTRES); i = (int)bp->post_limit_logins * 10; attr = (cuser.numlogins < i) ? 1 : 0; if (attr) outs(ANSI_COLOR(31)); prints("上站次數 %d 次以上", i); if (attr) outs(ANSI_RESET); - move_ansi(b_lines - 8, 54); + move_ansi(ipostres++, COLPOSTRES); i = (int)bp->post_limit_posts * 10; attr = (cuser.numposts < i) ? 1 : 0; if (attr) outs(ANSI_COLOR(31)); prints("文章篇數 %d 篇以上", i); if (attr) outs(ANSI_RESET); - move_ansi(b_lines - 7, 54); + move_ansi(ipostres++, COLPOSTRES); i = bp->post_limit_regtime; attr = (cuser.firstlogin > (now - (time4_t)bp->post_limit_regtime * 2592000)) ? 1 : 0; @@ -317,13 +322,26 @@ b_config(void) prints("註冊時間 %d 個月以上",i); if (attr) outs(ANSI_RESET); - move_ansi(b_lines - 6, 54); + move_ansi(ipostres++, COLPOSTRES); i = 255 - bp->post_limit_badpost; attr = (cuser.badpost > i) ? 1 : 0; if (attr) outs(ANSI_COLOR(31)); prints("劣文篇數 %d 篇以下", i); if (attr) outs(ANSI_RESET); + if (bp->brdattr & BRD_POSTMASK) + { + // see haspostperm() + unsigned int permok = bp->level & ~PERM_POST; + permok = permok ? HasUserPerm(permok) : 1; + move_ansi(ipostres++, COLPOSTRES); + prints("使用者等級: %s限定(%s要求)%s\n", + permok ? "" : ANSI_COLOR(31), + permok ? "已達" : "未達", + permok ? "" : ANSI_RESET + ); + } + move(b_lines, 0); if (!((currmode & MODE_BOARD) || HasUserPerm(PERM_SYSOP))) { |