summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chess-irc.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/chess-irc.el b/chess-irc.el
index 2f5d2c8..0b3b98c 100644
--- a/chess-irc.el
+++ b/chess-irc.el
@@ -25,7 +25,13 @@
:type 'string
:group 'chess-irc)
-(defvar chess-irc-regexp-alist chess-network-regexp-alist)
+(defvar chess-irc-regexp-alist
+ (append chess-network-regexp-alist
+ (list (cons ".+"
+ (function
+ (lambda ()
+ (message "Your opponent says: %s"
+ (match-string 0))))))))
(defvar chess-irc-process)
(defvar chess-irc-engine)
@@ -65,6 +71,8 @@
((eq event 'shutdown)
(ignore-errors
+ (chess-engine-send nil "game over"))
+ (ignore-errors
(process-send-string chess-irc-process "QUIT :Goodbye\n"))
(ignore-errors
(kill-buffer (process-buffer chess-irc-process))))