X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Friece-400.el;h=6dc4e434bb80c30984b8191022c86bc56153804e;hb=6d7051cd0e0b2c4cbd38ba31f0fa293ac1f9382d;hp=1c302f21adb8ed02811482c19497594f25e4b1e1;hpb=6155d4803505c8588a6515bcbd517918cb1f9329;p=elisp%2Friece.git diff --git a/lisp/riece-400.el b/lisp/riece-400.el index 1c302f2..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: @@ -28,7 +28,7 @@ (require 'riece-misc) (eval-when-compile - (autoload 'riece-default-handle-numeric-reply "riece-filter")) + (autoload 'riece-default-handle-numeric-reply "riece-handle")) (defun riece-handle-default-400-message (prefix number name string) (riece-default-handle-numeric-reply riece-error-prefix prefix number name string)) @@ -37,8 +37,9 @@ (condition-case nil (let (inhibit-quit) (read-string prompt)) - (quit))) - + (quit + (ignore (message "%s" (concat prompt "Quit")))))) + (defun riece-handle-432-message (prefix number name string) "ERR_ERRONEUSNICKNAME \" :Erroneous nickname\"." (let ((nickname @@ -62,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