[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 178/255: process igs "tell" messages
From: |
Eric Schulte |
Subject: |
[elpa] 178/255: process igs "tell" messages |
Date: |
Sun, 16 Mar 2014 01:02:44 +0000 |
eschulte pushed a commit to branch go
in repository elpa.
commit a2d731adff96280ac93777f13b87a072020f7cff
Author: Eric Schulte <address@hidden>
Date: Sun Jun 10 17:53:33 2012 -0600
process igs "tell" messages
---
back-ends/igs.el | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/back-ends/igs.el b/back-ends/igs.el
index 6078fa9..056c8f2 100644
--- a/back-ends/igs.el
+++ b/back-ends/igs.el
@@ -132,10 +132,12 @@ This is used to re-send messages to keep the IGS server
from timing out.")
(content (match-string 2 string)))
(case type
(:prompt (igs-w-proc proc (setq *igs-ready* t)))
- (:info (message "igs-info: %s" content))
+ (:info (unless (string= content "yes")
+ (message "igs-info: %s" content)))
(:games (igs-w-proc proc (igs-handle-game content)))
(:move (igs-w-proc proc (igs-handle-move content)))
(:kibitz (message "igs-kibitz: %s" content))
+ (:tell (igs-handle-tell content))
(:beep nil)
(t (message "igs-unknown: [%s]%s" type content)))
(when (> (time-to-seconds (time-since *igs-time-last-sent*))
@@ -312,6 +314,14 @@ This is used to re-send messages to keep the IGS server
from timing out.")
(defsetf igs-current-game set-igs-current-game)
+(defun igs-handle-tell (string)
+ (unless (string-match (format "\\*\\(%s\\)\\*: \\(.*\\)$" igs-player-name-re)
+ string)
+ (error "igs: malformed tell string %S" string))
+ ;; TODO: keep a message buffer for each user in which conversations
+ ;; may be saved... during games store messages as SGF comments.
+ (message "igs[%s]: %s" (match-string 1 string) (match-string 2 string)))
+
(defun igs-apply-move (move)
(if (aget (igs-current-game) :board)
(setf (go-move (aget (igs-current-game) :board)) move)
- [elpa] 182/255: reverse order of sizes, (continued)
- [elpa] 182/255: reverse order of sizes, Eric Schulte, 2014/03/15
- [elpa] 172/255: re-organized how files are loaded, Eric Schulte, 2014/03/15
- [elpa] 156/255: chunking responses from IGS server into full lines, Eric Schulte, 2014/03/15
- [elpa] 183/255: explicit connection method for back-end objects, Eric Schulte, 2014/03/15
- [elpa] 179/255: track and display prisoners, Eric Schulte, 2014/03/15
- [elpa] 184/255: safer and automatic quitting, Eric Schulte, 2014/03/15
- [elpa] 186/255: better interactive debugging, Eric Schulte, 2014/03/15
- [elpa] 191/255: don't throw error when backend passes, Eric Schulte, 2014/03/15
- [elpa] 185/255: remove dependencies on org-mode functions, Eric Schulte, 2014/03/15
- [elpa] 176/255: task managment, Eric Schulte, 2014/03/15
- [elpa] 178/255: process igs "tell" messages,
Eric Schulte <=
- [elpa] 181/255: NOTES #+option, Eric Schulte, 2014/03/15
- [elpa] 193/255: calculate the final score, Eric Schulte, 2014/03/15
- [elpa] 194/255: notes on scaling image sizes, Eric Schulte, 2014/03/15
- [elpa] 198/255: don't mutate hidden state, Eric Schulte, 2014/03/15
- [elpa] 196/255: mark an overlay with a black or white cross, Eric Schulte, 2014/03/15
- [elpa] 187/255: don't commit if process already quit, Eric Schulte, 2014/03/15
- [elpa] 188/255: adding README, Eric Schulte, 2014/03/15
- [elpa] 199/255: marking captured territory when game ends, Eric Schulte, 2014/03/15
- [elpa] 197/255: use new mark machinery to apply labels, Eric Schulte, 2014/03/15
- [elpa] 195/255: query backend for territory, Eric Schulte, 2014/03/15