* riece-misc.el (riece-get-channels-on-server): New function.
authorueno <ueno>
Mon, 4 Apr 2005 07:32:52 +0000 (07:32 +0000)
committerueno <ueno>
Mon, 4 Apr 2005 07:32:52 +0000 (07:32 +0000)
(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
lisp/riece-misc.el

index da3f1f5..cdccca6 100644 (file)
@@ -1,5 +1,10 @@
 2005-04-04  Daiki Ueno  <ueno@unixuser.org>
 
+       * 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.
index bc1e2c9..eb0de20 100644 (file)
     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
               (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