summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/modes.h3
-rw-r--r--mbbsd/bbs.c3
-rw-r--r--mbbsd/board.c11
-rw-r--r--mbbsd/more.c37
-rw-r--r--mbbsd/pmore.c11
5 files changed, 41 insertions, 24 deletions
diff --git a/include/modes.h b/include/modes.h
index e53801d2..9f6efa17 100644
--- a/include/modes.h
+++ b/include/modes.h
@@ -24,7 +24,8 @@
#define RET_DOSYSOPEDIT (996)
#define RET_DOCHESSREPLAY (995)
#define RET_DOBBSLUA (994)
-#define RET_COPY2TMP (993)
+#define RET_COPY2TMP (993)
+#define RET_SELECTBRD (992)
/* user 操作狀態與模式 */
#define IDLE 0
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index c8da182b..5de2d935 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -3967,8 +3967,7 @@ log_board(iconst char *mode, time4_t usetime)
int
Select(void)
{
- do_select();
- return 0;
+ return do_select();
}
#ifdef HAVEMOBILE
diff --git a/mbbsd/board.c b/mbbsd/board.c
index 717f8e8a..cafdf4a0 100644
--- a/mbbsd/board.c
+++ b/mbbsd/board.c
@@ -1502,7 +1502,7 @@ choose_board(int newflag)
break;
case 'S':
if(IS_LISTING_FAV()){
- move(b_lines - 2, 0);
+ move(b_lines - 2, 0); clrtobot();
outs("重新排序看板 "
ANSI_COLOR(1;33) "(注意, 這個動作會覆寫原來設定)" ANSI_RESET " \n");
tmp = getans("排序方式 (1)按照板名排序 (2)按照類別排序 ==> [0]取消 ");
@@ -1534,7 +1534,7 @@ choose_board(int newflag)
break;
case 's':
if ((tmp = search_board()) == -1) {
- show_brdlist(head, 1, newflag);
+ Select();
break;
}
head = -1;
@@ -1691,6 +1691,7 @@ choose_board(int newflag)
}
break;
+ case 'd': // why don't we enable 'd'?
case 'z':
case 'm':
if (HasFavEditPerm()) {
@@ -1704,12 +1705,14 @@ choose_board(int newflag)
ptr->myattr &= ~NBRD_FAV;
}
}
- else {
+ else
+ {
if (getboard(ptr->bid) != NULL) {
fav_remove_item(ptr->bid, FAVT_BOARD);
ptr->myattr &= ~NBRD_FAV;
}
- else {
+ else if (ch != 'd') // 'd' only deletes something.
+ {
if (fav_add_board(ptr->bid) == NULL)
vmsg("你的最愛太多了啦 真花心");
else
diff --git a/mbbsd/more.c b/mbbsd/more.c
index 94022854..7187162d 100644
--- a/mbbsd/more.c
+++ b/mbbsd/more.c
@@ -13,7 +13,7 @@ int more(char *fpath, int promptend)
r = FULLUPDATE;
if (!HasUserPerm(PERM_SYSOP) ||
- strcmp(fpath, "etc/ve.hlp") == 0)
+ strcmp(fpath, "etc/ve.hlp") == 0)
break;
#ifdef GLOBAL_SECURITY
@@ -30,35 +30,44 @@ int more(char *fpath, int promptend)
vedit2(fpath, NA, NULL, 0);
break;
+ case RET_SELECTBRD:
+ r = FULLUPDATE;
+ if (HasUserPerm(PERM_BASIC))
+ {
+ if (currstat == READING)
+ return Select();
+ }
+ break;
+
case RET_COPY2TMP:
r = FULLUPDATE;
if (HasUserPerm(PERM_BASIC))
{
- char buf[10];
- getdata(b_lines - 1, 0, "把這篇文章收入到暫存檔?[y/N] ",
- buf, 4, LCECHO);
- if (buf[0] != 'y')
- break;
- setuserfile(buf, ask_tmpbuf(b_lines - 1));
- Copy(fpath, buf);
+ char buf[10];
+ getdata(b_lines - 1, 0, "把這篇文章收入到暫存檔?[y/N] ",
+ buf, 4, LCECHO);
+ if (buf[0] != 'y')
+ break;
+ setuserfile(buf, ask_tmpbuf(b_lines - 1));
+ Copy(fpath, buf);
}
break;
case RET_DOCHESSREPLAY:
r = FULLUPDATE;
if (HasUserPerm(PERM_BASIC))
- {
- ChessReplayGame(fpath);
- }
+ {
+ ChessReplayGame(fpath);
+ }
break;
#if defined(USE_BBSLUA)
case RET_DOBBSLUA:
r = FULLUPDATE;
if (HasUserPerm(PERM_BASIC))
- {
- bbslua(fpath);
- }
+ {
+ bbslua(fpath);
+ }
break;
#endif
}
diff --git a/mbbsd/pmore.c b/mbbsd/pmore.c
index a7db6488..0d79a7f1 100644
--- a/mbbsd/pmore.c
+++ b/mbbsd/pmore.c
@@ -1683,7 +1683,7 @@ static const char * const pmore_help[] = {
"(0/g/Home) ($/G/End) 檔案開頭/結尾",
"數字鍵 1-9 (;/:) 跳至輸入的頁數或行數",
"\01進階功\能鍵",
- "(/)(s) 搜尋字串",
+ "(/) (s) 搜尋關鍵字/切換至其它看板",
"(n/N) 重複正/反向搜尋",
"(f/b) 跳至下/上篇",
"(a/A) 跳至同一作者下/上篇",
@@ -1696,8 +1696,9 @@ static const char * const pmore_help[] = {
#if defined (PMORE_USE_ASCII_MOVIE) || defined(RET_DOCHESSREPLAY)
"(p)/(z) 播放動畫/棋局打譜",
#endif // defined(PMORE_USE_ASCII_MOVIE) || defined(RET_DOCHESSREPLAY)
-
+#ifdef RET_COPY2TMP
"(Ctrl-T) 存入暫存檔",
+#endif
"(q/←) (h/H/?/F1) 結束/本說明畫面",
#ifdef DEBUG
"(d) 切換除錯(debug)模式",
@@ -2132,6 +2133,11 @@ pmore(char *fpath, int promptend)
flExit = 1, retval = RET_COPY2TMP;
break;
#endif
+#ifdef RET_SELECTBRD
+ case 's':
+ flExit = 1, retval = RET_SELECTBRD;
+ break;
+#endif
/* ------------------ EXITING KEYS ------------------ */
case 'A':
flExit = 1, retval = AUTHOR_PREV;
@@ -2289,7 +2295,6 @@ pmore(char *fpath, int promptend)
PMORE_UINAV_FORWARDPAGE();
break;
/* ------------------ SEARCH KEYS ------------------ */
- case 's':
case '/':
{
char sbuf[81] = "";