X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=zippy.c;h=564140e1251a22affbc5e4fac19920b253f3c335;hb=71a0dc43ed9498db72f4a302a4b11fabb93ab286;hp=6ec3d2ecd18ff278fd8a5cb2cc2084eb8437ef4d;hpb=8b519f2abff956ac1ccfcc4b51c7b9736e075d6c;p=xboard.git diff --git a/zippy.c b/zippy.c index 6ec3d2e..564140e 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; @@ -230,7 +230,8 @@ char *swifties[] = { "i enthuses:", "i entreats:", "i enunciates:", "i eulogizes:", "i exclaims:", "i execrates:", "i exhorts:", "i expatiates:", "i explains:", "i explicates:", "i explodes:", "i exposes:", - "i exposits:", "i expounds:", "i expresses:", "i extols:", + "i exposits:", "i expostulates: ", + "i expounds:", "i expresses:", "i extols:", "i exults:", "i fantasizes:", "i fibs:", "i filibusters:", "i flatters:", "i flutes:", "i fools:", "i free-associates:", "i fulminates:", "i gabbles:", "i gabs:", "i gasps:", @@ -744,6 +745,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 +876,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")) {