From ef7c29d679c6aaf8dda55772e65800097c46f163 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 15 Apr 2002 05:40:38 +0000 Subject: *** no comment *** --- chess-phalanx.el | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'chess-phalanx.el') diff --git a/chess-phalanx.el b/chess-phalanx.el index 270376d..846946e 100644 --- a/chess-phalanx.el +++ b/chess-phalanx.el @@ -28,15 +28,18 @@ (lambda () (error (match-string 1))))))) -(defun chess-phalanx-handler (event &rest args) - (cond - ((eq event 'initialize) - (let ((proc (chess-common-handler 'initialize "phalanx"))) - (process-send-string proc "nopost\n") - proc)) - - (t - (apply 'chess-common-handler event args)))) +(defun chess-phalanx-handler (game event &rest args) + (unless chess-engine-handling-event + (cond + ((eq event 'initialize) + (let ((proc (chess-common-handler game 'initialize "phalanx"))) + (when (and (processp proc) + (eq (process-status proc) 'run)) + (process-send-string proc "nopost\n") + t))) + + (t + (apply 'chess-common-handler game event args))))) (provide 'chess-phalanx) -- cgit v1.2.3