From 6230fb38239610aafd4b8fc150268c3d09f192f5 Mon Sep 17 00:00:00 2001 From: victor Date: Sun, 28 Sep 2003 14:27:18 +0000 Subject: ask before watching a chc game. fix wrong flow git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1208 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/chc.c | 3 +++ mbbsd/talk.c | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/mbbsd/chc.c b/mbbsd/chc.c index 42abbe22..1fad931a 100644 --- a/mbbsd/chc.c +++ b/mbbsd/chc.c @@ -1015,6 +1015,9 @@ chc_watch(void) if (uin->uid == currutmp->uid || uin->mode != CHC) return -1; + if (getans("是否進行觀棋? [N/y]") != 'y') + return 0; + if ((sock = make_connection_to_somebody(uin, 10)) < 0) { vmsg("無法建立連線"); return -1; diff --git a/mbbsd/talk.c b/mbbsd/talk.c index 2d07abcf..a576fbf4 100644 --- a/mbbsd/talk.c +++ b/mbbsd/talk.c @@ -1212,8 +1212,10 @@ my_talk(userinfo_t * uin, int fri_stat, char defact) sock = make_connection_to_somebody(uin, 20); if (sock < 0) vmsg("無法建立連線"); - strlcpy(currutmp->mateid, uin->userid, sizeof(currutmp->mateid)); - chc(sock, CHC_WATCH); + else { + strlcpy(currutmp->mateid, uin->userid, sizeof(currutmp->mateid)); + chc(sock, CHC_WATCH); + } } else outs("人家在忙啦"); -- cgit v1.2.3