* riece-filter.el (riece-sentinel): Don't call riece when
authorDaiki Ueno <ueno@unixuser.org>
Sat, 31 May 2003 02:25:42 +0000 (02:25 +0000)
committerDaiki Ueno <ueno@unixuser.org>
Sat, 31 May 2003 02:25:42 +0000 (02:25 +0000)
riece-reconnect-with-password = t and process !=
riece-server-process.

* riece-serevr.el (riece-open-server): Remove docstring.

lisp/ChangeLog
lisp/riece-filter.el
lisp/riece-server.el

index 4def359..4351743 100644 (file)
@@ -1,5 +1,9 @@
 2003-05-31  Daiki Ueno  <ueno@unixuser.org>
 
+       * riece-filter.el (riece-sentinel): Don't call riece when
+       riece-reconnect-with-password = t and process !=
+       riece-server-process.
+
        * riece-url.el: Fix usage.
 
        * riece-inlines.el (string-list-member-ignore-case): Remove docstring.
index 97a25a6..a2efcb3 100644 (file)
 (defun riece-sentinel (process status)
   (if riece-reconnect-with-password
       (unwind-protect
-         (riece)
+         (if (eq process riece-server-process)
+             (riece)                   ;Need to initialize system.
+           (let* ((entry (rassq process riece-server-process-alist))
+                  (server-name
+                   (with-current-buffer (process-buffer process)
+                     riece-server-name))
+                  (process
+                   (riece-start-server
+                    (riece-server-name-to-server server-name)
+                    server-name)))
+             ;; Connect the process with old process' buffer.
+             (setcdr entry process)
+             (with-current-buffer (process-buffer process)
+               (setq riece-server-name server-name))))
        (setq riece-reconnect-with-password nil))
     (let ((server-name (with-current-buffer (process-buffer process)
                         riece-server-name)))
index 859cf1e..565dd10 100644 (file)
@@ -64,9 +64,6 @@ the `riece-server-keyword-map' variable."
 (put 'riece-server-keyword-bind 'edebug-form-spec '(form body))
 
 (defun riece-start-server (server &optional server-name)
-  "Open network stream to remote irc server.
-If optional argument CONFIRM is non-nil, ask the host that the server
-is running on."
   (if server-name
       (message "Connecting to IRC server on %s..." server-name)
     (message "Connecting to IRC server..."))