From 4e21a7cb0007470acf57c5bf99e41d1f25272211 Mon Sep 17 00:00:00 2001 From: ueno Date: Mon, 4 Apr 2005 07:32:52 +0000 Subject: [PATCH] * riece-misc.el (riece-get-channels-on-server): New function. (riece-get-users-on-server): Don't use riece-user-p. (riece-get-identities-on-server): Call riece-get-channels-on-server and riece-get-users-on-server. --- lisp/ChangeLog | 5 +++++ lisp/riece-misc.el | 25 ++++++++++++++----------- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index da3f1f5..cdccca6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2005-04-04 Daiki Ueno + * riece-misc.el (riece-get-channels-on-server): New function. + (riece-get-users-on-server): Don't use riece-user-p. + (riece-get-identities-on-server): Call + riece-get-channels-on-server and riece-get-users-on-server. + * riece-identity.el (riece-completing-read-identity): Don't signal an error when input string does not match riece-channel-regexp nor riece-user-regexp. diff --git a/lisp/riece-misc.el b/lisp/riece-misc.el index bc1e2c9..eb0de20 100644 --- a/lisp/riece-misc.el +++ b/lisp/riece-misc.el @@ -214,12 +214,17 @@ user-at-host)) (defun riece-get-users-on-server (server-name) - (delq nil (mapcar (lambda (identity) - (if (riece-user-p (riece-identity-prefix identity)) - identity)) - (riece-get-identities-on-server server-name)))) + (riece-with-server-buffer server-name + (let (identities) + (mapatoms + (lambda (user) + (setq identities + (cons (riece-make-identity (symbol-name user) server-name) + identities))) + riece-user-obarray) + identities))) -(defun riece-get-identities-on-server (server-name) +(defun riece-get-channels-on-server (server-name) (riece-with-server-buffer server-name (let (identities) (mapatoms @@ -228,14 +233,12 @@ (cons (riece-make-identity (symbol-name channel) server-name) identities))) riece-channel-obarray) - (mapatoms - (lambda (user) - (setq identities - (cons (riece-make-identity (symbol-name user) server-name) - identities))) - riece-user-obarray) identities))) +(defun riece-get-identities-on-server (server-name) + (nconc (riece-get-channels-on-server server-name) + (riece-get-users-on-server server-name))) + (defun riece-check-channel-commands-are-usable (&optional channel) (unless riece-current-channel (error (substitute-command-keys -- 1.7.10.4