+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):
(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.
(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)
(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
(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.
(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)
(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)))
(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.
(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)