diff options
author | scw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-11-27 22:10:49 +0800 |
---|---|---|
committer | scw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-11-27 22:10:49 +0800 |
commit | b145b9d602205f09241f6a0505b189503a540afe (patch) | |
tree | fa50fd071c648a60d7afe3fb36b0420ccad787d3 | |
parent | 646c04559e8ddbd3d9d09fdeb0361435c8b8b272 (diff) | |
download | pttbbs-b145b9d602205f09241f6a0505b189503a540afe.tar pttbbs-b145b9d602205f09241f6a0505b189503a540afe.tar.gz pttbbs-b145b9d602205f09241f6a0505b189503a540afe.tar.bz2 pttbbs-b145b9d602205f09241f6a0505b189503a540afe.tar.lz pttbbs-b145b9d602205f09241f6a0505b189503a540afe.tar.xz pttbbs-b145b9d602205f09241f6a0505b189503a540afe.tar.zst pttbbs-b145b9d602205f09241f6a0505b189503a540afe.zip |
* Restrict the frequency of brc & fav write back request.
* Describe the key binding in help.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3251 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/board.c | 11 | ||||
-rw-r--r-- | sample/etc/boardlist.help | 2 |
2 files changed, 10 insertions, 3 deletions
diff --git a/mbbsd/board.c b/mbbsd/board.c index a81314bf..587f015d 100644 --- a/mbbsd/board.c +++ b/mbbsd/board.c @@ -42,6 +42,8 @@ static char choose_board_depth = 0; static short brdnum; static char yank_flag = 1; +static time4_t last_save_fav_and_brc; + /* These are all the states yank_flag may be. */ #define LIST_FAV() (yank_flag = 0) #define LIST_BRD() (yank_flag = 1) @@ -1169,8 +1171,13 @@ choose_board(int newflag) break; case 'w': - fav_save(); - brc_finalize(); + /* allowing save once per 10 minutes */ + if (now - last_save_fav_and_brc > 10 * 60) { + fav_save(); + brc_finalize(); + + last_save_fav_and_brc = now; + } break; case KEY_RIGHT: diff --git a/sample/etc/boardlist.help b/sample/etc/boardlist.help index 57362f7f..c7677ed9 100644 --- a/sample/etc/boardlist.help +++ b/sample/etc/boardlist.help @@ -16,7 +16,7 @@ 編輯: (m)(z)/(M) 把看板加入或移出我的最愛 / 改變看板位置 (a)(i)/(g)/(L) 新增 看板 / 目錄 / 分隔線 至我的最愛 (^A/^D) 將已標記看板加入 / 移出我的最愛 - 整理: (K/T) 備份,清理我的最愛 / 修改目錄名稱 + 整理: (K/T/w) 備份,清理我的最愛 / 修改目錄名稱 / 寫入已讀未讀紀錄 [36m【 小組長指令 】[m (E/W/B) 設定看板 / 設定小組備忘 / 開新看板 |