From 6f61ce560a5c6fc1e8845640e7b073000d181e9e Mon Sep 17 00:00:00 2001 From: Mario Lang Date: Thu, 17 Apr 2014 08:28:32 +0200 Subject: chess-ics.el: Add guest login support for chess.net. --- chess-ics.el | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/chess-ics.el b/chess-ics.el index aa1afff..e3eed02 100644 --- a/chess-ics.el +++ b/chess-ics.el @@ -38,8 +38,8 @@ (defcustom chess-ics-server-list '(("freechess.org" 5000) ("chess.unix-ag.uni-kl.de" 5000) - ("chess.mds.mdh.se" 5000) - ("chessclub.com" 5000)) + ("chessclub.com" 5000) + ("chess.net" 5000)) "A list of servers to connect to. The format of each entry is: @@ -238,6 +238,12 @@ standard position). In those cases, this variable should be set to nil.") (lambda () (chess-ics-send "") 'once))) + (cons "Press return to enter chess.net as \"\\([^\"]+\\)\":" + (function + (lambda () + (setq chess-ics-handle (match-string 1)) + (chess-ics-send "") + 'once))) (cons "%\\s-*$" (function (lambda () @@ -755,10 +761,12 @@ This function should be put on `comint-preoutput-filter-functions'." (inhibit-redisplay t)) (when (buffer-live-p buf) (with-current-buffer buf - (setq tabulated-list-entries - (cl-remove-if (lambda (entry) (member (car entry) ids)) - tabulated-list-entries)) - (tabulated-list-revert)))))) + (let ((old-length (length tabulated-list-entries))) + (setq tabulated-list-entries + (cl-remove-if (lambda (entry) (member (car entry) ids)) + tabulated-list-entries)) + (when (/= (length tabulated-list-entries) old-length) + (tabulated-list-revert)))))))) string) (make-variable-buffer-local 'comint-preoutput-filter-functions) -- cgit v1.2.3