diff options
-rw-r--r-- | mbbsd/bbs.c | 33 | ||||
-rw-r--r-- | mbbsd/board.c | 29 | ||||
-rw-r--r-- | mbbsd/read.c | 6 |
3 files changed, 31 insertions, 37 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index fdce8fe5..c8134c3d 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -3642,33 +3642,6 @@ b_notes_edit(void) } static int -bh_title_edit(void) -{ - boardheader_t *bp; - - if (currmode & MODE_BOARD) { - char genbuf[BTLEN]; - - assert(0<=currbid-1 && currbid-1<MAX_BOARD); - bp = getbcache(currbid); - move(1, 0); - clrtoeol(); - getdata_str(1, 0, "請輸入看板新中文敘述:", genbuf, - BTLEN - 16, DOECHO, bp->title + 7); - - if (!genbuf[0]) - return 0; - strip_ansi(genbuf, genbuf, STRIP_ALL); - strlcpy(bp->title + 7, genbuf, sizeof(bp->title) - 7); - assert(0<=currbid-1 && currbid-1<MAX_BOARD); - substitute_record(fn_board, bp, sizeof(boardheader_t), currbid); - log_usies("SetBoard", currboard); - return FULLUPDATE; - } - return 0; -} - -static int b_notes(void) { char buf[PATHLEN]; @@ -3962,7 +3935,7 @@ const onekey_t read_comms[] = { { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, // 'A' 65 - { 0, bh_title_edit }, // 'B' + { 0, b_config }, // 'B' { 1, do_limitedit }, // 'C' { 1, del_range }, // 'D' { 1, edit_post }, // 'E' @@ -3991,7 +3964,9 @@ const onekey_t read_comms[] = { { 1, recommend }, // 'X' { 1, recommend_cancel }, // 'Y' { 0, NULL }, // 'Z' 90 - { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, + { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, + { 1, push_bottom }, // '_' 95 + { 0, NULL }, { 0, NULL }, // 'a' 97 { 0, b_notes }, // 'b' { 1, cite_post }, // 'c' diff --git a/mbbsd/board.c b/mbbsd/board.c index ad1bc0e6..fe8af9ac 100644 --- a/mbbsd/board.c +++ b/mbbsd/board.c @@ -316,8 +316,8 @@ b_config(void) move(ytitle +2, 0); clrtobot(); - prints(" 中文敘述: %s\n", bp->title); - prints(" 板主名單: %s\n", (bp->BM[0] > ' ')? bp->BM : "(無)"); + prints(" "ANSI_COLOR(1;36) "b" ANSI_RESET " - 中文敘述: %s\n", bp->title); + prints(" 板主名單: %s\n", (bp->BM[0] > ' ')? bp->BM : "(無)"); outs(" \n"); // at least one character, for move_ansi. @@ -351,7 +351,7 @@ b_config(void) ); #ifndef OLDRECOMMEND - prints( " " ANSI_COLOR(1;36) "b" ANSI_RESET + prints( " " ANSI_COLOR(1;36) "s" ANSI_RESET " - %s " ANSI_RESET "噓文\n", ((bp->brdattr & BRD_NORECOMMEND) || (bp->brdattr & BRD_NOBOO)) ? ANSI_COLOR(1)"不開放":"開放"); @@ -383,7 +383,8 @@ b_config(void) ANSI_COLOR(1)"自動":"不會"); prints( " " ANSI_COLOR(1;36) "a" ANSI_RESET - " - 推文時 %s" ANSI_RESET " 開頭\n", + " - " ANSI_COLOR(1;32) "(新)" ANSI_RESET + " 推文時 %s" ANSI_RESET " 開頭\n", (bp->brdattr & BRD_ALIGNEDCMT) ? ANSI_COLOR(1)"對齊":"不用對齊"); @@ -548,6 +549,24 @@ b_config(void) touched = 1; break; + case 'b': + { + char genbuf[BTLEN+1]; + move(b_lines, 0); clrtoeol(); + SOLVE_ANSI_CACHE(); + outs("請輸入看板新中文敘述: "); + vgetstr(genbuf, BTLEN-16, 0, bp->title + 7); + if (!genbuf[0]) + break; + touched = 1; + strip_ansi(genbuf, genbuf, STRIP_ALL); + strlcpy(bp->title + 7, genbuf, sizeof(bp->title) - 7); + assert(0<=currbid-1 && currbid-1<MAX_BOARD); + substitute_record(fn_board, bp, sizeof(boardheader_t), currbid); + log_usies("SetBoard", currboard); + } + break; + case 'e': if(HasUserPerm(PERM_SYSOP)) { @@ -631,7 +650,7 @@ b_config(void) } break; #ifndef OLDRECOMMEND - case 'b': + case 's': if(bp->brdattr & BRD_NORECOMMEND) bp->brdattr |= BRD_NOBOO; bp->brdattr ^= BRD_NOBOO; diff --git a/mbbsd/read.c b/mbbsd/read.c index 5a2edc22..542c7fb8 100644 --- a/mbbsd/read.c +++ b/mbbsd/read.c @@ -666,9 +666,9 @@ i_read_key(const onekey_t * rcmdlist, keeploc_t * locmem, switch (ch) { case Ctrl('Z'): // notify new usage - move(b_lines-1, 0); clrtoeol(); - outs(ANSI_COLOR(1;33) "置底的功\能鍵已改為 Ctrl-X。" - "原 Ctrl-Z 現在是快速切換鍵,可在下列區域中切換:" ANSI_RESET); + move(b_lines-2, 0); clrtobot(); + outs(ANSI_COLOR(1;33) "置底的功\能鍵已改為 _ (shift-) 或 Ctrl-X。\n" + "原 Ctrl-Z 現在是快速切換鍵,可在下列區域中切換 (按下對應按鍵即可):" ANSI_RESET); mode = FULLUPDATE; if (ZA_Select()) mode = DOQUIT; |