Do not translate game-end messages in PGN
[xboard.git] / zippy.c
diff --git a/zippy.c b/zippy.c
index 5626092..ef1b505 100644 (file)
--- a/zippy.c
+++ b/zippy.c
@@ -5,7 +5,7 @@
  * Massachusetts. 
  *
  * Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005, 2006,
- * 2007, 2008, 2009 Free Software Foundation, Inc.
+ * 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
  *
  * Enhancements Copyright 2005 Alessandro Scotti
  *
@@ -412,10 +412,6 @@ int ZippyControl(buf, i)
     char *player, *p;
     char reply[MSG_SIZ];
 
-#if TRIVIA
-#include "trivia.c"
-#endif
-
     /* Possibly reject Crafty as opponent */
     if (appData.zippyPlay && appData.zippyNoplayCrafty && forwardMostMove < 4
        && looking_at(buf, i, "* kibitzes: Hello from Crafty")) 
@@ -680,18 +676,11 @@ int ZippyConverse(buf, i)
            channel++;
          }
          channel[strlen(channel)-1] = NULLCHAR;
-#if 0
-         /* Always tell to the channel (probability 90%) */
-         if (strcmp(player, ics_handle) != 0 &&
-             ((unsigned) random() % 10) < 9) {
-           Speak("tell", channel);
-         }
-#else
+
          /* Tell to the channel only if someone mentions our name */
          if (ZippyCalled(star_match[2])) {
            Speak("tell", channel);
          }
-#endif
 
           ColorizeEx( atoi(channel) == 1 ? ColorChannel1 : ColorChannel, FALSE );
        }
@@ -942,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")) {