diff options
author | scw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-02-12 21:51:57 +0800 |
---|---|---|
committer | scw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-02-12 21:51:57 +0800 |
commit | 3c2d03bf002f773219b214e14431a4423c577aad (patch) | |
tree | db3d8ed5fecd7d4e4a5ef321296cd01da42b72d0 /mbbsd | |
parent | 004bed327e87e05dcc7f673401ca45605a4cbaa5 (diff) | |
download | pttbbs-3c2d03bf002f773219b214e14431a4423c577aad.tar pttbbs-3c2d03bf002f773219b214e14431a4423c577aad.tar.gz pttbbs-3c2d03bf002f773219b214e14431a4423c577aad.tar.bz2 pttbbs-3c2d03bf002f773219b214e14431a4423c577aad.tar.lz pttbbs-3c2d03bf002f773219b214e14431a4423c577aad.tar.xz pttbbs-3c2d03bf002f773219b214e14431a4423c577aad.tar.zst pttbbs-3c2d03bf002f773219b214e14431a4423c577aad.zip |
Complete groups as well as boards in m_board()
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2504 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/admin.c | 2 | ||||
-rw-r--r-- | mbbsd/board.c | 1 | ||||
-rw-r--r-- | mbbsd/name.c | 9 |
3 files changed, 11 insertions, 1 deletions
diff --git a/mbbsd/admin.c b/mbbsd/admin.c index 78a0c945..da7a79ca 100644 --- a/mbbsd/admin.c +++ b/mbbsd/admin.c @@ -629,7 +629,7 @@ m_board() char bname[32]; stand_title("看板設定"); - CompleteBoard(msg_bid, bname); + CompleteBoardAndGroup(msg_bid, bname); if (!*bname) return 0; m_mod_board(bname); diff --git a/mbbsd/board.c b/mbbsd/board.c index b5ab2413..219ca185 100644 --- a/mbbsd/board.c +++ b/mbbsd/board.c @@ -1055,6 +1055,7 @@ choose_board(int newflag) int bid; move(0, 0); clrtoeol(); + /* use CompleteBoard or CompleteBoardAndGroup ? */ CompleteBoard("\033[7m【 增加我的最愛 】\033[m\n" "請輸入欲加入的看板名稱(按空白鍵自動搜尋):", bname); diff --git a/mbbsd/name.c b/mbbsd/name.c index b657e854..60afab03 100644 --- a/mbbsd/name.c +++ b/mbbsd/name.c @@ -716,6 +716,15 @@ completeboard_permission(int where) !(bptr->brdattr & BRD_GROUPBOARD)); } +int +complete_board_and_group_permission(int where) +{ + boardheader_t *bptr = &bcache[SHM->bsorted[0][where]]; + return (!(bptr->brdattr & BRD_SYMBOLIC) && + (GROUPOP() || HasPerm(bptr))); + +} + char * completeboard_getname(int where) { |