2003-10-04 Daiki Ueno <ueno@unixuser.org>
+ * riece-globals.el (riece-join-channel-candidate): New variable.
+ * riece-commands.el (riece-command-join): Prompt
+ riece-join-channel-candidate.
+
+ * riece-handle.el (riece-handle-invite-message): Set
+ riece-join-channel-candidate when the user is invited.
+ * riece-naming.el (riece-naming-assert-join): Clear
+ riece-join-channel-candidate.
+
+2003-10-04 Daiki Ueno <ueno@unixuser.org>
+
* riece-identity.el (riece-completing-read-identity): Pass 6th &
7th arguments to completing-read.
(interactive
(let* ((completion-ignore-case t)
(target
- (riece-completing-read-identity
- "Channel/User: " riece-current-channels))
+ (if riece-join-channel-candidate
+ (let ((default (riece-format-identity
+ riece-join-channel-candidate)))
+ (riece-completing-read-identity
+ (format "Channel/User (default %s): " default)
+ riece-current-channels nil nil nil nil default))
+ (riece-completing-read-identity
+ "Channel/User: " riece-current-channels)))
key)
(if (and current-prefix-arg
(riece-channel-p (riece-identity-prefix target)))
"The channel you currently have joined.")
(defvar riece-current-channels nil
"The channels you have currently joined.")
+(defvar riece-join-channel-candidate nil
+ "The candidate for channel to be used with the next join command.")
(defvar riece-save-variables-are-dirty nil
"Non nil if the variables in `riece-saved-forms' are changed.")
(let* ((user (riece-prefix-nickname prefix))
(parameters (riece-split-parameters string))
(invited (car parameters))
- (channel (nth 1 parameters)))
+ (channel (nth 1 parameters))
+ (channel-identity (riece-make-identity channel riece-server-name)))
+ (if (riece-identity-equal-no-server invited riece-real-nickname)
+ (setq riece-join-channel-candidate channel-identity))
(riece-insert-info
(list riece-dialogue-buffer riece-others-buffer)
(concat
user riece-server-name))
(riece-format-identity (riece-make-identity
invited riece-server-name))
- (riece-format-identity (riece-make-identity
- channel riece-server-name))))
+ (riece-format-identity channel-identity)))
"\n"))))
(defun riece-handle-topic-message (prefix string)
(let ((channel-identity (riece-make-identity channel-name
riece-server-name)))
(riece-join-channel channel-identity)
- (riece-switch-to-channel channel-identity))))
+ (riece-switch-to-channel channel-identity)
+ (setq riece-join-channel-candidate nil))))
(defun riece-naming-assert-part (user-name channel-name)
(riece-user-toggle-channel user-name channel-name nil)