summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-09-28 22:27:18 +0800
committervictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-09-28 22:27:18 +0800
commitc73e9fcd574e9607c8cf758eedf52fa5c68ed914 (patch)
treee857f4a384009c065caedd0b4ddc299516a9c17a
parent77005fdb1ae2c1c6ee778ab7e248a94616b79d1f (diff)
downloadpttbbs-c73e9fcd574e9607c8cf758eedf52fa5c68ed914.tar
pttbbs-c73e9fcd574e9607c8cf758eedf52fa5c68ed914.tar.gz
pttbbs-c73e9fcd574e9607c8cf758eedf52fa5c68ed914.tar.bz2
pttbbs-c73e9fcd574e9607c8cf758eedf52fa5c68ed914.tar.lz
pttbbs-c73e9fcd574e9607c8cf758eedf52fa5c68ed914.tar.xz
pttbbs-c73e9fcd574e9607c8cf758eedf52fa5c68ed914.tar.zst
pttbbs-c73e9fcd574e9607c8cf758eedf52fa5c68ed914.zip
ask before watching a chc game.
fix wrong flow git-svn-id: http://opensvn.csie.org/pttbbs/trunk@1208 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/mbbsd/chc.c3
-rw-r--r--pttbbs/mbbsd/talk.c6
2 files changed, 7 insertions, 2 deletions
diff --git a/pttbbs/mbbsd/chc.c b/pttbbs/mbbsd/chc.c
index 42abbe22..1fad931a 100644
--- a/pttbbs/mbbsd/chc.c
+++ b/pttbbs/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/pttbbs/mbbsd/talk.c b/pttbbs/mbbsd/talk.c
index 2d07abcf..a576fbf4 100644
--- a/pttbbs/mbbsd/talk.c
+++ b/pttbbs/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("人家在忙啦");