(while (and pointer
(null (car pointer)))
(setq pointer (cdr pointer)))
+ (when (null pointer)
+ (setq pointer riece-current-channels)
+ (while (and pointer
+ (null (car pointer)))
+ (setq pointer (cdr pointer))))
(if (car pointer)
(riece-command-switch-to-channel (car pointer))
(error "No such channel!")))))
(start riece-current-channels)
channel)
(while (and start (not (eq start pointer)))
- (if (car start)
- (setq channel (car start)))
+ (setq channel (car start))
(setq start (cdr start)))
+ (when (null channel)
+ (setq start (copy-sequence riece-current-channels))
+ (setq start (delq nil start))
+ (and (> (length start) 1)
+ (setq channel (nth (1- (length start)) start))))
(if channel
(riece-command-switch-to-channel channel)
(error "No such channel!")))))
(defun riece-command-toggle-away (&optional message)
"Mark yourself as being away."
(interactive
- (if current-prefix-arg
+ (if (and (not (riece-user-get-away (riece-current-nickname)))
+ (or (null riece-away-message)
+ current-prefix-arg))
(let ((message (read-string "Away message: ")))
(list message))))
(if message
(interactive
(list (completing-read "Server: " riece-server-alist)))
(if (assoc server-name riece-server-process-alist)
- (error "%s already opened" server-name)
+ (error "%s is already opened" server-name)
(riece-open-server
(riece-server-name-to-server server-name)
server-name)))