From: ueno Date: Sun, 19 Aug 2007 06:34:58 +0000 (+0000) Subject: (riece-command-kick-with-ban): Simplified. X-Git-Tag: riece-5_0_0~40 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f10668663fcdd159b77e0ca37feea423df74dee5;p=elisp%2Friece.git (riece-command-kick-with-ban): Simplified. --- diff --git a/lisp/riece-commands.el b/lisp/riece-commands.el index a6bdb9e..427fd3c 100644 --- a/lisp/riece-commands.el +++ b/lisp/riece-commands.el @@ -237,20 +237,18 @@ the layout to the selected layout-name." (defun riece-command-kick-with-ban (user pattern &optional message) (interactive (let ((completion-ignore-case t) - users) + user) (riece-check-channel-commands-are-usable t) (riece-with-server-buffer (riece-identity-server riece-current-channel) - (setq users (riece-channel-get-users (riece-identity-prefix - riece-current-channel)) + (setq user (completing-read + (riece-mcat "Kick user: ") + (riece-channel-get-users (riece-identity-prefix + riece-current-channel)))) (list - (completing-read (riece-mcat "Kick user: ") users) - (completing-read (riece-mcat "Ban pattern: ") - (mapcar - (lambda (user) - (list (concat (car user) "!" - (riece-user-get-user-at-host - (car user))))) - users)) + user + (read-from-minibuffer + (riece-mcat "Ban pattern: ") + (concat user "!" (riece-user-get-user-at-host user))) (if current-prefix-arg (read-string "Message: ")))))) (riece-send-string (format "MODE %s :+b %s\r\n"