- server-name (substring status 0 (1- (length status))))
- (message "Connection closed: %s"
- (substring status 0 (1- (length status))))))
- (riece-close-server server-name))))
+ server-name (substring status 0 (1- (length status)))))
+ (if (equal server-name "")
+ (message "Connection closed")
+ (message "Connection to \"%s\" closed" server-name)))
+ (let ((channels riece-current-channels))
+ (while channels
+ (if (and (car channels)
+ (equal (riece-identity-server (car channels))
+ server-name))
+ (riece-part-channel (car channels)))
+ (setq channels (cdr channels))))
+ (riece-redisplay-buffers)
+ (riece-close-server-process process)
+ ;; If no server process is available, exit.
+ (unless riece-server-process-alist
+ (riece-exit)))))