+2007-08-19 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-commands.el (riece-command-kick-with-ban): New command.
+
2007-06-21 Nikita Danilov <nikita@clusterfs.com>
* riece-000.el (riece-handle-001-message): Run
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))
("Add-on: " . "\e$B%"%I%*%s\e(B: ")
("Already registered" . "\e$BEPO?:Q$_$G$9\e(B")
("Away message: " . "\e$BN%@J$N%a%C%;!<%8\e(B: ")
+ ("Ban pattern: " . "\e$BN)F~6X;_%Q%?!<%s\e(B: ")
("Beginning of buffer" . "\e$B%P%C%U%!$N@hF,$G$9\e(B")
("CTCP CLIENTINFO for %s (%s) = %s" . "%s (%s) \e$B$N\e(B CTCP CLIENTINFO = %s")
("CTCP CLIENTINFO from %s (%s) to %s" . "%s (%s) \e$B$,\e(B %s \e$B$K\e(B CTCP CLIENTINFO")