From 074b894082d43e0443783a49fd5c69776e28c6b9 Mon Sep 17 00:00:00 2001 From: ueno Date: Sun, 5 Oct 2003 00:12:43 +0000 Subject: [PATCH] * riece-filter.el (riece-sentinel): Don't clear riece-reconnect-with-password. * riece-server.el (riece-open-server): Clear riece-reconnect-with-password here. --- lisp/ChangeLog | 7 +++++++ lisp/riece-filter.el | 20 +++++++++----------- lisp/riece-server.el | 12 ++++++------ 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1e7e8c0..75a4c00 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2003-10-05 Daiki Ueno + + * riece-filter.el (riece-sentinel): Don't clear + riece-reconnect-with-password. + * riece-server.el (riece-open-server): Clear + riece-reconnect-with-password here. + 2003-10-04 Daiki Ueno * riece-globals.el (riece-join-channel-candidate): New variable. diff --git a/lisp/riece-filter.el b/lisp/riece-filter.el index 6fb3b19..89abe6f 100644 --- a/lisp/riece-filter.el +++ b/lisp/riece-filter.el @@ -128,17 +128,15 @@ (autoload 'riece-exit "riece")) (defun riece-sentinel (process status) (if riece-reconnect-with-password - (unwind-protect - (let ((server-name - (with-current-buffer (process-buffer process) - riece-server-name))) - (riece-close-server-process process) - (riece-open-server - (if (equal server-name "") - riece-server - (riece-server-name-to-server server-name)) - server-name)) - (setq riece-reconnect-with-password nil)) + (let ((server-name + (with-current-buffer (process-buffer process) + riece-server-name))) + (riece-close-server-process process) + (riece-open-server + (if (equal server-name "") + riece-server + (riece-server-name-to-server server-name)) + server-name)) (let ((server-name (with-current-buffer (process-buffer process) riece-server-name))) (if riece-debug diff --git a/lisp/riece-server.el b/lisp/riece-server.el index ba66fce..0182813 100644 --- a/lisp/riece-server.el +++ b/lisp/riece-server.el @@ -148,13 +148,13 @@ the `riece-server-keyword-map' variable." (if (equal server-name "") (message "Logging in to IRC server...") (message "Logging in to %s..." server-name)) - (if (or password - riece-reconnect-with-password) + (if riece-reconnect-with-password ;password incorrect or not set. + (unwind-protect + (setq password (riece-read-passwd "Password: ")) + (setq riece-reconnect-with-password nil))) + (if password (riece-process-send-string process - (format "PASS %s\r\n" - (or password - (riece-read-passwd - "Password: "))))) + (format "PASS %s\r\n" password))) (riece-process-send-string process (format "USER %s * * :%s\r\n" (user-real-login-name) -- 1.7.10.4