From d1a9fe797375dc696d3c005f83f359f67d079cec Mon Sep 17 00:00:00 2001 From: ueno Date: Fri, 4 Feb 2005 08:44:12 +0000 Subject: [PATCH] * riece-300.el (riece-353-message-alist): Renamed from riece-353-string. --- lisp/ChangeLog | 2 +- lisp/riece-300.el | 24 +++++++++++++++--------- 2 files changed, 16 insertions(+), 10 deletions(-) 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) -- 1.7.10.4