* liece-channel.el (liece-channel-unread-p): New function.
(liece-channel-redisplay-buffer): Use it.
* liece-handle.el (liece-handle-privmsg-message): Ditto.
+2000-08-30 Akira Ohashi <bg66@luck.gr.jp>
+
+ * liece-vars.el (liece-channel-unread-list): New variable.
+
+ * liece-channel.el (liece-channel-unread-p): New function.
+ (liece-channel-redisplay-buffer): Use it.
+
+ * liece-handle.el (liece-handle-privmsg-message): Ditto.
+
2000-08-29 Akira Ohashi <bg66@luck.gr.jp>
* liece-channel.el (liece-channel-change): Run
(and (stringp item) (liece-channel-equal chnl item)))
chnls))
+(defun liece-channel-unread-p (chnl)
+ "Return non-nil if CHNL is unread channel."
+ (member-if
+ (lambda (item)
+ (and (stringp item) (liece-channel-equal chnl item)))
+ liece-channel-unread-list))
+
(defun liece-channel-get-nicks (&optional chnl)
"Return CHNL or current channels's members as list."
(get (intern (or chnl liece-current-channel) liece-obarray) 'nick))
(cdr (string-assoc-ignore-case
chnl liece-channel-buffer-alist)))
(window (liece-get-buffer-window liece-channel-buffer)))
+ (and (liece-channel-unread-p chnl)
+ (setq liece-channel-unread-list
+ (delete chnl liece-channel-unread-list)))
(and buffer window
(with-current-buffer buffer
(set-window-buffer window buffer)
(liece-message-type 'privmsg))
(liece-display-message temp))
+ ;; Append to the unread list.
+ (let ((item (if (eq liece-command-buffer 'chat)
+ liece-current-chat-partner
+ liece-current-channel)))
+ (and (not (liece-channel-equal chnl item))
+ (not (liece-channel-unread-p chnl))
+ (setq liece-channel-unread-list
+ (cons chnl liece-channel-unread-list))))
+
(and (liece-nick-equal chnl liece-real-nickname)
(not (liece-nick-equal prefix liece-current-chat-partner))
(liece-message (_ "A private message has arrived from %s")
(defvar liece-status-message-string nil)
+(defvar liece-channel-unread-list nil)
+
;; Hooks.
(defgroup liece-hook nil
"Hooks"