From 42e31f8eeb303141b360d377fe14510f8ceb3e7a Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Thu, 29 May 2003 09:45:22 +0000 Subject: [PATCH] * 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. --- lisp/ChangeLog | 6 ++++++ lisp/riece-commands.el | 26 ++++++++++++++++++++++++++ lisp/riece.el | 4 +++- 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5b750a9..0c01923 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,11 @@ 2003-05-29 Daiki Ueno + * 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. diff --git a/lisp/riece-commands.el b/lisp/riece-commands.el index 6b84c48..f00eb99 100644 --- a/lisp/riece-commands.el +++ b/lisp/riece-commands.el @@ -195,6 +195,32 @@ (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) diff --git a/lisp/riece.el b/lisp/riece.el index dd7e2c9..75f38e7 100644 --- a/lisp/riece.el +++ b/lisp/riece.el @@ -151,6 +151,7 @@ If optional argument SAFE is nil, overwrite previous definitions." "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 @@ -158,7 +159,8 @@ If optional argument SAFE is nil, overwrite previous definitions." "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 -- 2.25.1