From: ueno Date: Thu, 3 Feb 2005 08:26:51 +0000 (+0000) Subject: * riece-400.el (riece-handle-475-message): New handler; query X-Git-Tag: riece-1_0_7~59 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=efeb6ad68a48f5c8c4a5e39c85a37685ca40faf8;p=elisp%2Friece.git * riece-400.el (riece-handle-475-message): New handler; query channel key. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 92dd125..eed70d2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2005-02-03 Daiki Ueno + * riece-400.el (riece-handle-475-message): New handler; query + channel key. + +2005-02-03 Daiki Ueno + * riece-addon.el (riece-resolve-addon-dependencies): Rename from riece-resolve-addon. (riece-resolve-addon): Append add-ons under riece-addon-directory. diff --git a/lisp/riece-400.el b/lisp/riece-400.el index 014d974..cb166c7 100644 --- a/lisp/riece-400.el +++ b/lisp/riece-400.el @@ -63,6 +63,26 @@ (message "Password incorrect from %s." prefix) (setq riece-reconnect-with-password t)) +(defun riece-handle-475-message (prefix number name string) + "ERR_BADCHANNELKEY \" :Cannot join channel (+k)\"." + (let* ((parameters (riece-split-parameters string)) + (channel-identity (riece-make-identity (car parameters) + riece-server-name)) + key) + (message "%s: %s" (car parameters) (nth 1 parameters)) + (setq key + (condition-case nil + (let (inhibit-quit) + (riece-read-passwd + (format "Key for %s: " + (riece-format-identity channel-identity t)))) + (quit + (message (format "Key for %s: Quit" + (riece-format-identity channel-identity t))) + 'quit))) + (unless (eq key 'quit) + (riece-command-join-channel channel-identity key)))) + (provide 'riece-400) ;;; riece-400.el ends here