diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-13 01:37:50 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-13 01:37:50 +0800 |
commit | 6afda685033a3b0b51e565c16925acf578295df5 (patch) | |
tree | 103142081fdb34f9d324128f40304e64e9ae0e43 | |
parent | ba7d0724d84952fd0989b99ba5e9ef42d8b8f262 (diff) | |
download | pttbbs-6afda685033a3b0b51e565c16925acf578295df5.tar pttbbs-6afda685033a3b0b51e565c16925acf578295df5.tar.gz pttbbs-6afda685033a3b0b51e565c16925acf578295df5.tar.bz2 pttbbs-6afda685033a3b0b51e565c16925acf578295df5.tar.lz pttbbs-6afda685033a3b0b51e565c16925acf578295df5.tar.xz pttbbs-6afda685033a3b0b51e565c16925acf578295df5.tar.zst pttbbs-6afda685033a3b0b51e565c16925acf578295df5.zip |
- board: add group search for 's'.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4150 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/board.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/mbbsd/board.c b/mbbsd/board.c index b9fcdbf7..193fe04c 100644 --- a/mbbsd/board.c +++ b/mbbsd/board.c @@ -94,6 +94,8 @@ int enter_board(const char *boardname) bh = getbcache(bid); if (!HasBoardPerm(bh)) return -2; + if (IS_GROUP(bh)) + return -1; strlcpy(bname, bh->brdname, sizeof(bname)); if (bname[0] == '\0') @@ -1548,21 +1550,25 @@ choose_board(int newflag) break; case 's': { - // XXX TODO - // 現在這樣搜不到群組... - // - // try global search instead. - int trysearch = ReadSelect(); - // restore my mode - setutmpmode(newflag ? READNEW : READBRD); + char bname[IDLEN*2]; + move(0, 0); + clrtoeol(); + CompleteBoardAndGroup(MSG_SELECT_BOARD, bname); // force refresh head = -1; - // try to match cursor if we can. - if (trysearch && currboard) + if (!*bname) + break; + // try to search board + if ((tmp = search_board(bname)) != -1) { - if ((tmp = search_board(currboard)) != -1) - num = tmp; + num = tmp; + break; } + // try to enter board directly. + if(enter_board(bname) >= 0) + Read(); + // restore my mode + setutmpmode(newflag ? READNEW : READBRD); } break; |