+2004-11-14 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el (riece-exit): Reset riece-channel-status-indicator.
+ (riece-command-mode): Display riece-channel-status-indicator.
+ (riece-dialogue-mode): Ditto.
+ (riece-channel-mode): Ditto.
+
+ * riece-display.el (riece-update-channel-status-indicator): New
+ function.
+ (riece-update-indicator-functions): Add it.
+
+ * riece-globals.el (riece-channel-status-indicator): New indicator.
+
+2004-11-13 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el (riece-select-keys): Bind
+ riece-command-switch-to-channel-by-number to "#".
+
2004-11-11 Masatake YAMATO <jet@gyve.org>
* riece-yank.el (riece-command-yank): Fix a typo in comments.
(defvar riece-update-indicator-functions
'(riece-update-status-indicators
+ riece-update-channel-status-indicator
riece-update-channel-indicator
riece-update-long-channel-indicator
riece-update-channel-list-indicator)
'channel-switched
(lambda (signal handback)
(riece-update-status-indicators)
+ (riece-update-channel-status-indicator)
(riece-update-channel-indicator)
(riece-update-long-channel-indicator)
(force-mode-line-update t)
(riece-connect-signal
'channel-operators-changed
(lambda (signal handback)
+ (riece-update-channel-status-indicator)
(riece-emit-signal 'user-list-changed riece-current-channel))
(lambda (signal)
(and riece-current-channel
(riece-connect-signal
'channel-speakers-changed
(lambda (signal handback)
+ (riece-update-channel-status-indicator)
(riece-emit-signal 'user-list-changed riece-current-channel))
(lambda (signal)
(and riece-current-channel
(setq riece-channel-list-indicator "No channel")))
(defun riece-update-status-indicators ()
- (if riece-current-channel
- (with-current-buffer riece-command-buffer
- (riece-with-server-buffer (riece-identity-server riece-current-channel)
- (setq riece-away-indicator
- (if (and riece-real-nickname
- (riece-user-get-away riece-real-nickname))
- "A"
- "-")
- riece-operator-indicator
- (if (and riece-real-nickname
- (riece-user-get-operator riece-real-nickname))
- "O"
- "-")
- riece-user-indicator riece-real-nickname))))
+ (let ((server-name (riece-current-server-name)))
+ (if server-name
+ (with-current-buffer riece-command-buffer
+ (riece-with-server-buffer server-name
+ (setq riece-away-indicator
+ (if (and riece-real-nickname
+ (riece-user-get-away riece-real-nickname))
+ "A"
+ "-")
+ riece-operator-indicator
+ (if (and riece-real-nickname
+ (riece-user-get-operator riece-real-nickname))
+ "O"
+ "-")
+ riece-user-indicator riece-real-nickname)))))
(walk-windows
(lambda (window)
(with-current-buffer (window-buffer window)
"F"
"-"))))))))
+(defun riece-update-channel-status-indicator ()
+ (if (and riece-current-channel
+ (riece-channel-p (riece-identity-prefix riece-current-channel)))
+ (let ((users
+ (riece-with-server-buffer (riece-identity-server
+ riece-current-channel)
+ (riece-channel-get-users (riece-identity-prefix
+ riece-current-channel))))
+ (nickname
+ (riece-with-server-buffer (riece-identity-server
+ riece-current-channel)
+ riece-real-nickname)))
+ (with-current-buffer riece-command-buffer
+ (setq riece-channel-status-indicator
+ (if nickname
+ (let ((user (cdr (riece-identity-assoc nickname users t))))
+ (if (memq ?o user)
+ "@"
+ (if (memq ?v user)
+ "+")
+ "-"))
+ "-"))))))
+
(defun riece-update-buffers (&optional buffers)
(unless buffers
(setq buffers riece-buffer-list))
"Non nil if add-ons are already insinuated.")
(defvar riece-select-keys
- `("1" riece-command-switch-to-channel-by-number-1
+ `("#" riece-command-switch-to-channel-by-number
+ "1" riece-command-switch-to-channel-by-number-1
"2" riece-command-switch-to-channel-by-number-2
"3" riece-command-switch-to-channel-by-number-3
"4" riece-command-switch-to-channel-by-number-4
riece-channel-list-indicator "No channel"
riece-away-indicator "-"
riece-operator-indicator "-"
+ riece-channel-status-indicator "-"
riece-freeze-indicator "-")
(delete-other-windows)
(run-hooks 'riece-exit-hook))
(setq riece-away-indicator "-"
riece-operator-indicator "-"
+ riece-channel-status-indicator "-"
major-mode 'riece-command-mode
mode-name "Command"
mode-line-buffer-identification
'("Riece: "
riece-away-indicator
riece-operator-indicator
+ riece-channel-status-indicator
" "
riece-user-indicator
" "
(setq riece-freeze riece-default-freeze
riece-away-indicator "-"
riece-operator-indicator "-"
+ riece-channel-status-indicator "-"
major-mode 'riece-dialogue-mode
mode-name "Dialogue"
mode-line-buffer-identification
riece-away-indicator
riece-operator-indicator
riece-freeze-indicator
+ riece-channel-status-indicator
" "
riece-channel-list-indicator " "))
truncate-lines nil
riece-away-indicator
riece-operator-indicator
riece-freeze-indicator
+ riece-channel-status-indicator
" "
riece-long-channel-indicator))))