From: ueno Date: Tue, 21 Oct 2003 10:04:55 +0000 (+0000) Subject: * riece-ctcp.el (riece-ctcp-completing-read-identity): New X-Git-Tag: riece-0_1_5~25 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e80d8bca8483810b02c86c633eebfb9d6885826e;p=elisp%2Friece.git * riece-ctcp.el (riece-ctcp-completing-read-identity): New function. (riece-command-ctcp-version): Use it. (riece-command-ctcp-ping): Ditto. (riece-command-ctcp-clientinfo): Ditto. (riece-command-ctcp-action): Ditto; don't encode CHANNEL identity twice. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7380d26..298790f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2003-10-21 Daiki Ueno + + * riece-ctcp.el (riece-ctcp-completing-read-identity): New + function. + (riece-command-ctcp-version): Use it. + (riece-command-ctcp-ping): Ditto. + (riece-command-ctcp-clientinfo): Ditto. + (riece-command-ctcp-action): Ditto; don't encode CHANNEL identity + twice. + 2003-10-20 Daiki Ueno * riece-xemacs.el (riece-xemacs-mode-line-buffer-identification): diff --git a/lisp/riece-ctcp.el b/lisp/riece-ctcp.el index 240c9ac..9406b12 100644 --- a/lisp/riece-ctcp.el +++ b/lisp/riece-ctcp.el @@ -251,37 +251,36 @@ string)) "\n"))) +(defun riece-ctcp-completing-read-identity () + (riece-completing-read-identity + "Channel/User: " + (let ((server-name (riece-current-server-name))) + (append (mapcar + (lambda (user) + (riece-make-identity user server-name)) + (riece-get-users-on-server)) + riece-current-channels)))) + (defun riece-command-ctcp-version (user) (interactive - (let ((completion-ignore-case t)) - (list (completing-read - "Channel/User: " - (mapcar #'list (riece-get-users-on-server)))))) + (list (riece-ctcp-completing-read-identity))) (riece-send-string (format "PRIVMSG %s :\1VERSION\1\r\n" user))) (defun riece-command-ctcp-ping (user) (interactive - (let ((completion-ignore-case t)) - (list (completing-read - "Channel/User: " - (mapcar #'list (riece-get-users-on-server)))))) + (list (riece-ctcp-completing-read-identity))) (riece-send-string (format "PRIVMSG %s :\1PING\1\r\n" user)) (setq riece-ctcp-ping-time (current-time))) (defun riece-command-ctcp-clientinfo (user) (interactive - (let ((completion-ignore-case t)) - (list (completing-read - "Channel/User: " - (mapcar #'list (riece-get-users-on-server)))))) + (list (riece-ctcp-completing-read-identity))) (riece-send-string (format "PRIVMSG %s :\1CLIENTINFO\1\r\n" user))) (defun riece-command-ctcp-action (channel action) (interactive (list (if current-prefix-arg - (completing-read - "Channel/User: " - (mapcar #'list riece-current-channels)) + (riece-ctcp-completing-read-identity) riece-current-channel) (read-string "Action: "))) (if (equal action "") @@ -289,8 +288,7 @@ (riece-send-string (format "PRIVMSG %s :\1ACTION %s\1\r\n" (riece-identity-prefix channel) action)) - (let ((buffer (riece-channel-buffer (riece-make-identity - channel riece-server-name)))) + (let ((buffer (riece-channel-buffer channel))) (riece-insert-change buffer (concat (riece-identity-prefix (riece-current-nickname)) " " action "\n"))