From e16427fff440af3fe682116b101aaba4573ec7fa Mon Sep 17 00:00:00 2001 From: ueno Date: Thu, 28 Mar 2002 18:17:14 +0000 Subject: [PATCH] * liece-400.el (liece-handle-475-message): New handler. * liece-commands.el (liece-command-join): Don't encode a channel name before treating it as an integer. * liece-ctcp.el: Don't throw an error when liece-q-ccl is not found. --- lisp/liece-400.el | 6 ++++++ lisp/liece-commands.el | 28 ++++++++++++++-------------- lisp/liece-ctcp.el | 5 ++--- 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/lisp/liece-400.el b/lisp/liece-400.el index b56e3de..2bce593 100644 --- a/lisp/liece-400.el +++ b/lisp/liece-400.el @@ -137,6 +137,12 @@ (_ "Password incorrect from %s. Try again with password.") prefix) (setq liece-reconnect-with-password t)) +(defun liece-handle-475-message (prefix rest) + "ERR_BADCHANNELKEY \"\" :Cannot join channel (+k)\"." + (liece-command-join prefix + (liece-read-passwd + (format (_ "Key for channel %s: ") prefix)))) + (defun liece-handle-482-message (prefix rest) "ERR_CHANOPRIVSNEEDED \" :You're not channel operator\"." (liece-message (_ "You are not a channel operator"))) diff --git a/lisp/liece-commands.el b/lisp/liece-commands.el index 340b9a5..c7817fb 100644 --- a/lisp/liece-commands.el +++ b/lisp/liece-commands.el @@ -235,22 +235,22 @@ with specified user." (liece-read-passwd (format (_ "Key for channel %s: ") join-channel-var))))) (list join-channel-var key))) - (let ((real-chnl (liece-channel-real join-channel-var))) (if (numberp join-channel-var) (liece-switch-to-channel-no join-channel-var) - (setq liece-default-channel-candidate nil) - (if (liece-channel-p real-chnl) - (liece-toggle-command-buffer-mode 'channel) - (liece-toggle-command-buffer-mode 'chat)) - (if (eq liece-command-buffer-mode 'chat) - (liece-command-join-partner join-channel-var) - (if (null key) - (setq key (get (intern join-channel-var liece-obarray) 'key))) - (put (intern join-channel-var liece-obarray) 'key key) - (if (null key) - (setq key "")) - (liece-command-join-channel join-channel-var key)) - (force-mode-line-update)))) + (let ((real-chnl (liece-channel-real join-channel-var))) + (setq liece-default-channel-candidate nil) + (if (liece-channel-p real-chnl) + (liece-toggle-command-buffer-mode 'channel) + (liece-toggle-command-buffer-mode 'chat)) + (if (eq liece-command-buffer-mode 'chat) + (liece-command-join-partner join-channel-var) + (if (null key) + (setq key (get (intern join-channel-var liece-obarray) 'key))) + (put (intern join-channel-var liece-obarray) 'key key) + (if (null key) + (setq key "")) + (liece-command-join-channel join-channel-var key)) + (force-mode-line-update)))) (defun liece-command-part (part-channel-var &optional part-msg) "Part a PART-CHANNEL-VAR with PART-MSG." diff --git a/lisp/liece-ctcp.el b/lisp/liece-ctcp.el index 238f8ec..88a85a8 100644 --- a/lisp/liece-ctcp.el +++ b/lisp/liece-ctcp.el @@ -35,9 +35,8 @@ (require 'pccl) -(if-broken ccl-usable - (require 'liece-q-el) - (require 'liece-q-ccl)) +(or (broken-p 'ccl-usable) (require 'liece-q-ccl nil 'noerror) + (require 'liece-q-el)) (require 'liece-x-face) -- 1.7.10.4