* riece-globals.el (riece-obarray-size, riece-obarray): Abolish.
authorkaoru <kaoru>
Fri, 25 Feb 2005 19:17:16 +0000 (19:17 +0000)
committerkaoru <kaoru>
Fri, 25 Feb 2005 19:17:16 +0000 (19:17 +0000)
(riece-channel-obarray-size, riece-user-obarray-size)
(riece-channel-obaary, riece-user-obarray): New variables.
* riece-user.el (riece-find-user, riece-forget-user)
(riece-rename-user, riece-get-user): Use `riece-user-obarray'
instead of `riece-user-obarray'.
* riece-channel.el (riece-find-channel, riece-forget-channel)
(riece-get-channel): Use `riece-channel-obarray' instead of
`riece-obarray'.
* riece-misc.el (riece-get-identities-on-server): Ditto.
* riece-server.el (riece-reset-process-buffer): Ditto.

lisp/ChangeLog
lisp/riece-channel.el
lisp/riece-globals.el
lisp/riece-misc.el
lisp/riece-server.el
lisp/riece-user.el

index 0ca347c..a43c610 100644 (file)
@@ -1,3 +1,17 @@
+2005-02-25  TAKAHASHI Kaoru  <kaoru@kaisei.org>
+
+       * riece-globals.el (riece-obarray-size, riece-obarray): Abolish.
+       (riece-channel-obarray-size, riece-user-obarray-size)
+       (riece-channel-obaary, riece-user-obarray): New variables.
+       * riece-user.el (riece-find-user, riece-forget-user)
+       (riece-rename-user, riece-get-user): Use `riece-user-obarray'
+       instead of `riece-user-obarray'.
+       * riece-channel.el (riece-find-channel, riece-forget-channel)
+       (riece-get-channel): Use `riece-channel-obarray' instead of
+       `riece-obarray'.
+       * riece-misc.el (riece-get-identities-on-server): Ditto.
+       * riece-server.el (riece-reset-process-buffer): Ditto.
+
 2005-02-24  Daiki Ueno  <ueno@unixuser.org>
 
        * riece-unread.el (riece-unread-after-switch-to-channel-function):
index a59b7ed..2536e5b 100644 (file)
 (defun riece-find-channel (name)
   "Get a channel object named NAME from the server buffer."
   (let ((symbol (intern-soft (riece-identity-canonicalize-prefix name)
-                            riece-obarray)))
+                            riece-channel-obarray)))
     (if symbol
        (symbol-value symbol))))
 
 (defun riece-forget-channel (name)
   (let ((symbol (intern-soft (riece-identity-canonicalize-prefix name)
-                            riece-obarray)))
+                            riece-channel-obarray)))
     (when symbol
       (makunbound symbol)
-      (unintern (symbol-name symbol) riece-obarray))))
+      (unintern (symbol-name symbol) riece-channel-obarray))))
 
 (defun riece-make-channel (users topic modes banned invited uninvited key)
   "Make an instance of channel object.
@@ -53,11 +53,11 @@ respectively."
 
 (defun riece-get-channel (name)
   (let ((symbol (intern-soft (riece-identity-canonicalize-prefix name)
-                            riece-obarray)))
+                            riece-channel-obarray)))
     (if symbol
        (symbol-value symbol)
       (set (intern (riece-identity-canonicalize-prefix name)
-                  riece-obarray)
+                  riece-channel-obarray)
           (riece-make-channel nil nil nil nil nil nil nil)))))
 
 (defun riece-channel-users (channel)
index a4addfa..56fb58b 100644 (file)
 (defvar riece-reconnect-with-password nil
   "If non-nil, attempt to reconnect with password.")
 
-(defvar riece-obarray-size 1327
-  "The size of obarray used by riece on channelname and username space.")
+(defvar riece-user-obarray-size 1327
+  "The size of obarray used by riece on username space.")
+
+(defvar riece-channel-obarray-size 103
+  "The size of obarray used by riece on channelname space.")
 
 ;;; Variables local to the server buffers:
 (defvar riece-server-name nil
@@ -117,8 +120,11 @@ Local to the server buffers.")
 (defvar riece-last-send-time nil
   "Timestamp of the last send.
 Local to the server buffers.")
-(defvar riece-obarray nil
-  "Namespace of the IRC world.
+(defvar riece-user-obarray nil
+  "USER namespace of the IRC world.
+Local to the server buffers.")
+(defvar riece-channel-obarray nil
+  "Channel namespace of the IRC world.
 Local to the server buffers.")
 (defvar riece-coding-system nil
   "Coding system for process I/O.
index 2e2a912..bc1e2c9 100644 (file)
   (riece-with-server-buffer server-name
     (let (identities)
       (mapatoms
-       (lambda (atom)
+       (lambda (channel)
         (setq identities
-              (cons (riece-make-identity (symbol-name atom) server-name)
+              (cons (riece-make-identity (symbol-name channel) server-name)
                     identities)))
-       riece-obarray)
+       riece-channel-obarray)
+      (mapatoms
+       (lambda (user)
+        (setq identities
+              (cons (riece-make-identity (symbol-name user) server-name)
+                    identities)))
+       riece-user-obarray)
       identities)))
 
 (defun riece-check-channel-commands-are-usable (&optional channel)
index 39c1610..3204193 100644 (file)
@@ -259,8 +259,10 @@ the `riece-server-keyword-map' variable."
     (setq riece-send-size 0)
     (make-local-variable 'riece-last-send-time)
     (setq riece-last-send-time '(0 0 0))
-    (make-local-variable 'riece-obarray)
-    (setq riece-obarray (make-vector riece-obarray-size 0))
+    (make-local-variable 'riece-user-obarray)
+    (setq riece-user-obarray (make-vector riece-user-obarray-size 0))
+    (make-local-variable 'riece-channel-obarray)
+    (setq riece-channel-obarray (make-vector riece-channel-obarray-size 0))
     (make-local-variable 'riece-coding-system)
     (buffer-disable-undo)
     (erase-buffer)))
index 8a3f974..9ad4ee1 100644 (file)
@@ -30,7 +30,7 @@
 (defun riece-find-user (name)
   "Get a user object named NAME from the server buffer."
   (let ((symbol (intern-soft (riece-identity-canonicalize-prefix name)
-                            riece-obarray)))
+                            riece-user-obarray)))
      (if symbol
         (symbol-value symbol))))
 
   (let ((symbol (intern-soft (riece-identity-canonicalize-prefix name))))
     (when symbol
       (makunbound symbol)
-      (unintern (symbol-name symbol) riece-obarray))))
+      (unintern (symbol-name symbol) riece-user-obarray))))
 
 (defun riece-rename-user (old-name new-name)
   (unless (equal (riece-identity-canonicalize-prefix old-name)
                 (riece-identity-canonicalize-prefix new-name))
     (let ((symbol (intern-soft (riece-identity-canonicalize-prefix old-name)
-                              riece-obarray)))
+                              riece-user-obarray)))
       (when symbol
        (set (intern (riece-identity-canonicalize-prefix new-name)
-                    riece-obarray)
+                    riece-user-obarray)
             (symbol-value symbol))
        (makunbound symbol)
-       (unintern (symbol-name symbol) riece-obarray)))))
+       (unintern (symbol-name symbol) riece-user-obarray)))))
 
 (defun riece-make-user (channels user-at-host modes away operator)
   "Make an instance of user object.
@@ -60,11 +60,11 @@ away status, respectively."
 
 (defun riece-get-user (name)
   (let ((symbol (intern-soft (riece-identity-canonicalize-prefix name)
-                            riece-obarray)))
+                            riece-user-obarray)))
      (if symbol
         (symbol-value symbol)
        (set (intern (riece-identity-canonicalize-prefix name)
-                   riece-obarray)
+                   riece-user-obarray)
            (riece-make-user nil nil nil nil nil)))))
 
 (defun riece-user-channels (user)