X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Friece-400.el;h=6dc4e434bb80c30984b8191022c86bc56153804e;hb=c87b8b5e7dcba14804b7f0bee453a0a4093f3e85;hp=014d974f1e125f7e685226e3827da57dd57e5d2d;hpb=39b5dd21add31d3b7ff1d0872985ba4217a40a62;p=elisp%2Friece.git diff --git a/lisp/riece-400.el b/lisp/riece-400.el index 014d974..6dc4e43 100644 --- a/lisp/riece-400.el +++ b/lisp/riece-400.el @@ -19,8 +19,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Code: @@ -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 "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