+ (mapcar #'list (riece-get-users-on-server))))))
+ (riece-send-string (format "INVITE %s %s\r\n"
+ user (riece-identity-prefix
+ riece-current-channel))))
+
+(defun riece-command-kick (user &optional message)
+ (interactive
+ (let ((completion-ignore-case t))
+ (riece-check-channel-commands-are-usable t)
+ (list (completing-read
+ "User: "
+ (mapcar #'list
+ (riece-with-server-buffer
+ (riece-identity-server riece-current-channel)
+ (riece-channel-get-users
+ (riece-identity-prefix riece-current-channel)))))
+ (if current-prefix-arg
+ (read-string "Message: ")))))
+ (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))))
+
+(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-identity-prefix
+ 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-identity-prefix
+ 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-list (pattern)
+ (interactive
+ (let ((completion-ignore-case t))
+ (list (read-from-minibuffer
+ "Pattern: "
+ (if (and riece-current-channel
+ (riece-channel-p (riece-identity-prefix
+ riece-current-channel)))
+ (cons (riece-identity-prefix riece-current-channel)
+ 0))))))
+ (if (or (not (equal pattern ""))
+ (yes-or-no-p "Really want to query LIST without argument? "))
+ (riece-send-string (format "LIST %s\r\n" pattern))))