2003-05-29 Daiki Ueno <ueno@unixuser.org>
+ * riece-commands.el (riece-command-names): New command.
+ (riece-command-who): New command.
+
+ * riece.el (riece-dialogue-mode-map): Bind riece-command-names and
+ riece-command-who.
+
* riece-300.el (riece-handle-341-message): New handler.
(riece-handle-352-message): New handler.
(riece-identity-prefix riece-current-channel)
user))))
+(defun riece-command-names (pattern)
+ (interactive
+ (let ((completion-ignore-case t))
+ (list (read-from-minibuffer
+ "Pattern: "
+ (if (and riece-current-channel
+ (riece-channel-p riece-current-channel))
+ (cons (riece-identity-prefix riece-current-channel)
+ 0))))))
+ (if (or (not (equal pattern ""))
+ (yes-or-no-p "Really want to query NAMES without argument? "))
+ (riece-send-string (format "NAMES %s\r\n" pattern))))
+
+(defun riece-command-who (pattern)
+ (interactive
+ (let ((completion-ignore-case t))
+ (list (read-from-minibuffer
+ "Pattern: "
+ (if (and riece-current-channel
+ (riece-channel-p riece-current-channel))
+ (cons (riece-identity-prefix riece-current-channel)
+ 0))))))
+ (if (or (not (equal pattern ""))
+ (yes-or-no-p "Really want to query WHO without argument? "))
+ (riece-send-string (format "WHO %s\r\n" pattern))))
+
(defun riece-command-change-mode (channel change)
(interactive
(let* ((completion-ignore-case t)
"m" riece-dialogue-enter-message
"M" riece-command-change-mode
"n" riece-command-change-nickname
+ "\C-n" riece-command-names
"o" other-window
"O" riece-command-open-server
"C" riece-command-close-server
"q" riece-command-quit
"r" riece-command-configure-windows
"x" riece-command-copy-region
- "t" riece-command-topic)
+ "t" riece-command-topic
+ "w" riece-command-who)
(riece-define-keys riece-command-mode-map
"\r" riece-command-enter-message