From: ueno Date: Sun, 19 Aug 2007 06:18:13 +0000 (+0000) Subject: * riece-commands.el (riece-command-kick-with-ban): New command. X-Git-Tag: riece-5_0_0~43 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=dc8c36353762a4e7b143e396019244e2d75821a9;p=elisp%2Friece.git * riece-commands.el (riece-command-kick-with-ban): New command. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 76295e9..5bd8996 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2007-08-19 Daiki Ueno + + * riece-commands.el (riece-command-kick-with-ban): New command. + 2007-06-21 Nikita Danilov * riece-000.el (riece-handle-001-message): Run diff --git a/lisp/riece-commands.el b/lisp/riece-commands.el index 8efa507..60f4c60 100644 --- a/lisp/riece-commands.el +++ b/lisp/riece-commands.el @@ -234,6 +234,39 @@ the layout to the selected layout-name." user)) riece-current-channel)) +(defun riece-command-kick-with-ban (user pattern &optional message) + (interactive + (let ((completion-ignore-case t) + users patterns) + (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)) + patterns (mapcar + (lambda (user) + (list (concat (car user) "!" + (riece-user-get-user-at-host + (car user))))) + users))) + (list + (completing-read (riece-mcat "Kick user: ") users) + (completing-read (riece-mcat "Ban pattern: ") patterns) + (if current-prefix-arg + (read-string "Message: "))))) + (riece-send-string (format "MODE %s :+b %s\r\n" + (riece-identity-prefix riece-current-channel) + pattern) + riece-current-channel) + (riece-send-string + (if message + (format "KICK %s %s :%s\r\n" + (riece-identity-prefix riece-current-channel) + user message) + (format "KICK %s %s\r\n" + (riece-identity-prefix riece-current-channel) + user)) + riece-current-channel)) + (defun riece-command-names (pattern) (interactive (let ((completion-ignore-case t)) diff --git a/lisp/riece-mcat-japanese.el b/lisp/riece-mcat-japanese.el index fa60382..d73d32c 100644 --- a/lisp/riece-mcat-japanese.el +++ b/lisp/riece-mcat-japanese.el @@ -64,6 +64,7 @@ ("Add-on: " . "アドオン: ") ("Already registered" . "登録済みです") ("Away message: " . "離席のメッセージ: ") + ("Ban pattern: " . "立入禁止パターン: ") ("Beginning of buffer" . "バッファの先頭です") ("CTCP CLIENTINFO for %s (%s) = %s" . "%s (%s) の CTCP CLIENTINFO = %s") ("CTCP CLIENTINFO from %s (%s) to %s" . "%s (%s) が %s に CTCP CLIENTINFO")