summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-05-28 16:27:22 +0800
committerscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-05-28 16:27:22 +0800
commite70946135d00ae955f6a447994472ee15a16d9df (patch)
treefec3373e9ff97e4938ef568206dd4b14228414c0
parent6b957f167e59782f2342e692ac1fd749e2adf025 (diff)
downloadpttbbs-e70946135d00ae955f6a447994472ee15a16d9df.tar
pttbbs-e70946135d00ae955f6a447994472ee15a16d9df.tar.gz
pttbbs-e70946135d00ae955f6a447994472ee15a16d9df.tar.bz2
pttbbs-e70946135d00ae955f6a447994472ee15a16d9df.tar.lz
pttbbs-e70946135d00ae955f6a447994472ee15a16d9df.tar.xz
pttbbs-e70946135d00ae955f6a447994472ee15a16d9df.tar.zst
pttbbs-e70946135d00ae955f6a447994472ee15a16d9df.zip
Allowing denying being watched when playing chess.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3520 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/chess.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/mbbsd/chess.c b/mbbsd/chess.c
index 0a76e166..1fd83821 100644
--- a/mbbsd/chess.c
+++ b/mbbsd/chess.c
@@ -1034,8 +1034,15 @@ ChessPlay(ChessInfo* info)
CurrentPlayingGameInfo = info;
{
+ char buf[4] = "";
sigset_t sigset;
- old_handler = Signal(SIGUSR1, &ChessWatchRequest);
+
+ if(info->mode == CHESS_MODE_VERSUS)
+ getdata(b_lines, 0, "¬O§_±µ¨üÆ[´Ñ? (Y/n)", buf, sizeof(buf), DOECHO);
+ if(buf[0] == 'n' || buf[0] == 'N')
+ old_handler = Signal(SIGUSR1, SIG_IGN);
+ else
+ old_handler = Signal(SIGUSR1, &ChessWatchRequest);
sigemptyset(&sigset);
sigaddset(&sigset, SIGUSR1);