From c551a728b8fa7649b043fffb32b7f1d11c67b38a Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sun, 1 Aug 2010 13:27:23 +0200 Subject: [PATCH] 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). --- zippy.c | 11 ++--------- 1 files changed, 2 insertions(+), 9 deletions(-) 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")) { -- 1.7.0.4