summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2014-02-05 20:46:47 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2014-02-05 20:46:47 +0800
commit82fa294edb5e060b5300daef5eba030c5f2c862f (patch)
tree9f03787bd377e416fdf83a4ec9140f4b6297542f
parentf8444da45898bfc9cc19c82395e3277506695995 (diff)
downloadpttbbs-82fa294edb5e060b5300daef5eba030c5f2c862f.tar
pttbbs-82fa294edb5e060b5300daef5eba030c5f2c862f.tar.gz
pttbbs-82fa294edb5e060b5300daef5eba030c5f2c862f.tar.bz2
pttbbs-82fa294edb5e060b5300daef5eba030c5f2c862f.tar.lz
pttbbs-82fa294edb5e060b5300daef5eba030c5f2c862f.tar.xz
pttbbs-82fa294edb5e060b5300daef5eba030c5f2c862f.tar.zst
pttbbs-82fa294edb5e060b5300daef5eba030c5f2c862f.zip
Add a check before changing board settings, to avoid copy-paste error.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5914 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/mbbsd/board.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/pttbbs/mbbsd/board.c b/pttbbs/mbbsd/board.c
index 18a09292..b155f084 100644
--- a/pttbbs/mbbsd/board.c
+++ b/pttbbs/mbbsd/board.c
@@ -316,7 +316,7 @@ int
b_config(void)
{
boardheader_t *bp=NULL;
- int touched = 0, finished = 0;
+ int touched = 0, finished = 0, check_mod = 1;
int i = 0, attr = 0, ipostres;
char isBM = (currmode & MODE_BOARD) || HasUserPerm(PERM_SYSOP);
// perm cache
@@ -346,7 +346,7 @@ b_config(void)
#define CANTPOSTMSG ANSI_COLOR(1;31) "(您未達限制)" ANSI_RESET
- while(!finished) {
+ while (!finished) {
// limits
uint8_t llogin = bp->post_limit_logins,
lbp = bp->post_limit_badpost;
@@ -571,6 +571,12 @@ b_config(void)
return FULLUPDATE;
}
+ if (check_mod) {
+ if (vmsg("若要進行修改請按 Ctrl-P,其它鍵直接離開。") != Ctrl('P'))
+ return FULLUPDATE;
+ check_mod = 0;
+ }
+
switch(vans("請輸入要改變的設定, 其它鍵結束: "))
{
#ifdef USE_AUTOCPLOG