X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=zippy.c;h=ba668504d9add53b4308fb4f45771d819c0aecf8;hb=a033b3e97d60c1d05ee5ec3a54f7c61d6225962a;hp=6ec3d2ecd18ff278fd8a5cb2cc2084eb8437ef4d;hpb=8b519f2abff956ac1ccfcc4b51c7b9736e075d6c;p=xboard.git diff --git a/zippy.c b/zippy.c index 6ec3d2e..ba66850 100644 --- a/zippy.c +++ b/zippy.c @@ -91,11 +91,11 @@ extern char *getenv(); static char zippyPartner[MSG_SIZ]; static char zippyLastOpp[MSG_SIZ]; static int zippyConsecGames; -static time_t zippyLastGameEnd; - -extern void mysrandom(unsigned int seed); +static time_t zippyLastGameEnd; + +extern void mysrandom(unsigned int seed); extern int myrandom(void); - + void ZippyInit() { char *p; @@ -744,6 +744,11 @@ void ZippyHandleChallenge(srated, swild, sbase, sincrement, opponent) base = atoi(sbase); increment = atoi(sincrement); + /* If icsAnalyzeEngine active + we don't accept automatic games */ + if (appData.icsActive) + if (appData.icsEngineAnalyze) return; + /* If desired, you can insert more code here to decline matches based on rated, variant, base, and increment, but it is easier to use the ICS formula feature instead. */ @@ -870,21 +875,21 @@ int ZippyMatch(buf, i) StripHighlightAndTitle(star_match[0])); return TRUE; } - + if (ics_type == ICS_ICC) { - if (looking_at(buf, i, "Your opponent offers you a draw")) { - if (first.sendDrawOffers && first.initDone) - SendToProgram("draw\n", &first); - return TRUE; - } - } else { + if (looking_at(buf, i, "Your opponent offers you a draw")) { + if (first.sendDrawOffers && first.initDone) + SendToProgram("draw\n", &first); + return TRUE; + } + } else { if (looking_at(buf, i, "offers you a draw")) { if (first.sendDrawOffers && first.initDone) { SendToProgram("draw\n", &first); } return TRUE; } - } + } if (looking_at(buf, i, "requests that the game be aborted") || looking_at(buf, i, "would like to abort")) {