From: ueno Date: Fri, 4 Feb 2005 08:44:12 +0000 (+0000) Subject: * riece-300.el (riece-353-message-alist): Renamed from riece-353-string. X-Git-Tag: riece-1_0_7~31 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d1a9fe797375dc696d3c005f83f359f67d079cec;p=elisp%2Friece.git * riece-300.el (riece-353-message-alist): Renamed from riece-353-string. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 117325d..394331d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -2,7 +2,7 @@ * riece-filter.el (riece-filter): Accept lines which end with LF. - * riece-300.el (riece-353-string): Renamed from riece-353-users. + * riece-300.el (riece-353-message-alist): Renamed from riece-353-users. (riece-handle-353-message): Don't parse the reply. (riece-handle-366-message): Parse 353 replies here; count users. diff --git a/lisp/riece-300.el b/lisp/riece-300.el index 018144c..dd33c6d 100644 --- a/lisp/riece-300.el +++ b/lisp/riece-300.el @@ -229,16 +229,20 @@ (substring string (match-end 0)))) "\n")))) -(defvar riece-353-string nil) +(defvar riece-353-message-alist nil) (defun riece-handle-353-message (prefix number name string) "RPL_NAMREPLY \"[=\*@] :[[@|+] [[@|+] [...]]]\"." + (make-local-variable 'riece-353-message-alist) (if (string-match "^[=\*@] *\\([^ ]+\\) +:?" string) - (let ((channel (match-string 1 string)) - (start 0) - user) - (make-local-variable 'riece-353-string) - (setq riece-353-string (concat riece-353-string - (substring string (match-end 0))))))) + (let* ((channel (match-string 1 string)) + (entry (assoc channel riece-353-message-alist))) + (if entry + (setcdr entry + (concat (cdr entry) + (substring string (match-end 0)))) + (setq riece-353-message-alist + (cons (cons channel (substring string (match-end 0))) + riece-353-message-alist)))))) (defun riece-handle-322-message (prefix number name string) (if (string-match "^\\([^ ]+\\) \\([0-9]+\\) :?" string) @@ -410,10 +414,12 @@ (channel-identity (riece-make-identity channel riece-server-name)) (buffer (riece-channel-buffer channel-identity)) - (string (copy-sequence riece-353-string)) + (entry (assoc channel riece-353-message-alist)) + (string (cdr entry)) (start 0) users) - (setq riece-353-string nil) + (if entry + (setcdr entry nil)) (while (string-match (concat "\\([@+]\\)?\\(" riece-user-regexp "\\) *") string start)