+2000-08-29 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-channel.el (liece-channel-change): Run
+ `liece-redisplay-buffer-functions' only when
+ `liece-current-channel' is non-nil.
+
+ * liece-commands.el (liece-command-who): Check
+ `liece-current-channel'.
+ (liece-command-names): Ditto.
+ Suggested by: Yoichi NAKAYAMA <yoichi@eken.phys.nagoya-u.ac.jp>.
+
2000-08-30 Akira Ohashi <bg66@luck.gr.jp>
* liece-vars.el (liece-channel-unread-list): New variable.
(let ((chnls (if (eq liece-command-buffer-mode 'chat)
liece-current-chat-partners
liece-current-channels))
- (string ""))
+ (string "")
+ chnl)
(with-current-buffer liece-channel-list-buffer
(let ((n 1) buffer-read-only)
(erase-buffer)
(liece-channel-list-add-button n chnl))
(incf n))))
(if (string-equal string "")
- (cond
- ((eq liece-command-buffer-mode 'chat)
- (setq liece-channels-indicator "No partner"
- liece-current-chat-partner nil))
- (t
- (setq liece-channels-indicator "No channel"
- liece-current-channel nil)))
+ (if (eq liece-command-buffer-mode 'chat)
+ (setq liece-channels-indicator "No partner")
+ (setq liece-channels-indicator "No channel"))
(setq liece-channels-indicator (substring string 1)))
(liece-set-channel-indicator)
- (save-excursion
- (run-hook-with-args 'liece-redisplay-buffer-functions chnl))
+ (when liece-current-channel
+ (save-excursion
+ (run-hook-with-args
+ 'liece-redisplay-buffer-functions liece-current-channel)))
(liece-configure-windows)))
(defsubst liece-channel-set-operator-1 (chnl user val)
(liece-next-line 1))
(liece-message (_ "No text to send")))))
-(defun liece-command-names (&optional channel)
- "List the nicknames of the current IRC users on given CHANNEL.
+(defun liece-command-names (&optional expr)
+ "List the nicknames of the current IRC users on given EXPR.
With an Control-U as argument, only the current channel is listed.
With - as argument, list all channels."
(interactive
(if (or current-prefix-arg (null liece-current-channel))
(if (eq current-prefix-arg '-)
(list current-prefix-arg))
- (let ((completion-ignore-case t) channel)
- (setq channel (liece-minibuffer-completing-default-read
+ (let ((completion-ignore-case t) expr)
+ (setq expr (liece-minibuffer-completing-default-read
(_ "Names on channel: ")
liece-channel-alist nil nil liece-current-channel))
- (unless (string-equal "" channel)
- (list channel)))))
- (cond
- ((not channel)
- (liece-send "NAMES %s"
- (liece-channel-real liece-current-channel)))
- ((and (eq channel '-)
- (y-or-n-p (_ "Do you really query NAMES without argument?")))
- (liece-send "NAMES"))
- (t
- (liece-send "NAMES %s" (liece-channel-real channel)))))
+ (unless (string-equal "" expr)
+ (list expr)))))
+ (when (or (and (eq expr '-)
+ (y-or-n-p
+ (_ "Do you really query NAMES without argument?")))
+ (not (or expr
+ (if liece-current-channel
+ (setq expr (liece-channel-real
+ liece-current-channel))))))
+ (setq expr ""))
+ (when expr
+ (liece-send "NAMES %s" expr)))
(defun liece-command-nickname (nick)
"Set your nickname to NICK."
(append liece-channel-alist liece-nick-alist)))
(unless (string-equal "" expr)
(list expr)))))
- (cond
- ((not expr)
- (liece-send "WHO %s" (liece-channel-real liece-current-channel)))
- ((and (eq expr '-)
- (y-or-n-p (_ "Do you really query WHO without argument?")))
- (liece-send "WHO"))
- (t
+ (when (or (and (eq expr '-)
+ (y-or-n-p
+ (_ "Do you really query WHO without argument?")))
+ (not (or expr
+ (if liece-current-channel
+ (setq expr (liece-channel-real
+ liece-current-channel))))))
+ (setq expr ""))
+ (when expr
(liece-send "WHO %s" expr)
- (setq liece-who-expression expr))))
+ (setq liece-who-expression expr)))
(defun liece-command-finger (finger-nick-var &optional server)
"Get information about a specific user FINGER-NICK-VAR.