* riece-server.el (riece-quit-server-process): New function.
* riece-commands.el (riece-command-quit): Use it.
(riece-command-close-server): Use it.
* riece-commands.el (riece-command-previous-channel): Skip nil in
riece-current-channels.
+2003-08-17 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-options.el (riece-quit-timeout): New user option.
+ * riece-server.el (riece-quit-server-process): New function.
+ * riece-commands.el (riece-command-quit): Use it.
+ (riece-command-close-server): Use it.
+
+2003-08-17 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-commands.el (riece-command-previous-channel): Skip nil in
+ riece-current-channels.
+
2003-08-09 Daiki Ueno <ueno@unixuser.org>
* riece-rdcc.el (riece-command-dcc-send): Accept output only from
(start riece-current-channels)
channel)
(while (and start (not (eq start pointer)))
- (setq channel (car start))
+ (if (car start)
+ (setq channel (car start)))
(setq start (cdr start)))
(when (null channel)
(setq start (copy-sequence riece-current-channels))
(riece-extended-version))))
(process-list riece-process-list))
(while process-list
- (riece-process-send-string (car process-list)
- (if message
- (format "QUIT :%s\r\n" message)
- "QUIT\r\n"))
+ (riece-quit-server-process (car process-list) message)
(setq process-list (cdr process-list))))))
(defun riece-command-raw (command)
(read-string "Message: ")
(or riece-quit-message
(riece-extended-version)))))
- (riece-process-send-string (riece-server-process server-name)
- (if message
- (format "QUIT :%s\r\n" message)
- "QUIT\r\n")))
+ (riece-quit-server-process (riece-server-process server-name) message))
(defun riece-command-universal-server-name-argument ()
(interactive)
:type 'boolean
:group 'riece-server)
+(defcustom riece-quit-timeout 60
+ "Quit timeout when there is no response from server."
+ :type 'integer
+ :group 'riece-server)
+
(defcustom riece-channel-buffer-mode t
"When non-nil, Riece will display a channel buffer."
:type 'boolean
(throw 'found t))
(setq process-list (cdr process-list))))))
+(defun riece-quit-server-process (process &optional message)
+ (run-at-time riece-quit-timeout nil
+ (lambda (process)
+ (if (memq process riece-process-list)
+ (kill-process (process-buffer process))))
+ process)
+ (riece-process-send-string process
+ (if message
+ (format "QUIT :%s\r\n" message)
+ "QUIT\r\n")))
+
(provide 'riece-server)
;;; riece-server.el ends here