summaryrefslogtreecommitdiffstats
path: root/mbbsd/chicken.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-08-19 20:14:48 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-08-19 20:14:48 +0800
commit60c53c20d80245a1bea976bb9974295bb790fc4a (patch)
tree8f86d63eb068468b3328f9a5fa79094e01c62eff /mbbsd/chicken.c
parent3eac366fd24b8fce50b8a411ee47514b451bb62c (diff)
downloadpttbbs-60c53c20d80245a1bea976bb9974295bb790fc4a.tar
pttbbs-60c53c20d80245a1bea976bb9974295bb790fc4a.tar.gz
pttbbs-60c53c20d80245a1bea976bb9974295bb790fc4a.tar.bz2
pttbbs-60c53c20d80245a1bea976bb9974295bb790fc4a.tar.lz
pttbbs-60c53c20d80245a1bea976bb9974295bb790fc4a.tar.xz
pttbbs-60c53c20d80245a1bea976bb9974295bb790fc4a.tar.zst
pttbbs-60c53c20d80245a1bea976bb9974295bb790fc4a.zip
* force confirm y/n input for chiken death
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4753 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/chicken.c')
-rw-r--r--mbbsd/chicken.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/mbbsd/chicken.c b/mbbsd/chicken.c
index 32288158..5631fd19 100644
--- a/mbbsd/chicken.c
+++ b/mbbsd/chicken.c
@@ -888,8 +888,14 @@ recover_chicken(chicken_t * thechicken)
"你有一個剛走不久的%s要招換回來嗎? 只要 %d 元唷 " ANSI_RESET,
chicken_type[(int)thechicken->type], price);
outmsg(buf);
- bell();
- getdata(21, 0, " 選擇 (N:坑人嘛/y:請幫幫我): ", buf, 3, LCECHO);
+
+ // prevent user accident hit
+ do {
+ bell();
+ getdata(21, 0, " 選擇 (N:坑人嘛/y:請幫幫我): ", buf, 3, LCECHO);
+ }
+ while (buf[0] != 'y' && buf[0] != 'n');
+
if (buf[0] == 'y') {
reload_money();
if (cuser.money < price) {