summaryrefslogtreecommitdiffstats
path: root/mbbsd/board.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-04-20 00:25:39 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-04-20 00:25:39 +0800
commit9af2fcafb5c2b0743abf9a55ee2a8d1245933cb7 (patch)
treeff637e2c6aeec056ed5141cd3baf0f8a0bf2f29e /mbbsd/board.c
parenta2c803335ee0562bb60a8aa8ae668d12bd413cb3 (diff)
downloadpttbbs-9af2fcafb5c2b0743abf9a55ee2a8d1245933cb7.tar
pttbbs-9af2fcafb5c2b0743abf9a55ee2a8d1245933cb7.tar.gz
pttbbs-9af2fcafb5c2b0743abf9a55ee2a8d1245933cb7.tar.bz2
pttbbs-9af2fcafb5c2b0743abf9a55ee2a8d1245933cb7.tar.lz
pttbbs-9af2fcafb5c2b0743abf9a55ee2a8d1245933cb7.tar.xz
pttbbs-9af2fcafb5c2b0743abf9a55ee2a8d1245933cb7.tar.zst
pttbbs-9af2fcafb5c2b0743abf9a55ee2a8d1245933cb7.zip
- move 'B' (edit board title) to 'b' in board_config (i/I), and B now also activates board_config (B/i/I).
This helps to work in compatible with M3 hotkeys. - add '_' key binding (M3) for push_bottom (^X now) git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4209 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/board.c')
-rw-r--r--mbbsd/board.c29
1 files changed, 24 insertions, 5 deletions
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;