From efeb6ad68a48f5c8c4a5e39c85a37685ca40faf8 Mon Sep 17 00:00:00 2001 From: ueno Date: Thu, 3 Feb 2005 08:26:51 +0000 Subject: [PATCH] * riece-400.el (riece-handle-475-message): New handler; query channel key. --- lisp/ChangeLog | 5 +++++ lisp/riece-400.el | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+) 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 -- 1.7.10.4