From: H.G. Muller Date: Sun, 1 Aug 2010 11:27:23 +0000 (+0200) Subject: Fix zippy handling of draw offers from ICS X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=c551a728b8fa7649b043fffb32b7f1d11c67b38a;hp=32d6537664a734207772608507882f5a682a2c0a;p=xboard.git Fix zippy handling of draw offers from ICS The patch by DM to fix the problem introduced by the coloration of zippy-matched commands (namely that the coloration code beat the zippy draw recognition to it, and ate the draw offer away) was only targeting ICC. The new fix should work on any ICS (by using the same pattern in zippy as in the colorization code). --- diff --git a/zippy.c b/zippy.c index 9df805a..ef1b505 100644 --- a/zippy.c +++ b/zippy.c @@ -931,20 +931,13 @@ int ZippyMatch(buf, i) } - if (ics_type == ICS_ICC) { // [DM] - 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 (looking_at(buf, i, "Your opponent offers you a draw") || + 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")) {