(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..."))
(cdr entry)))
(defun riece-open-server (server server-name)
- "Open chat server on HOST.
-If HOST is nil, use value of environment variable \"IRCSERVER\".
-If optional argument SERVICE is non-nil, open by the service name."
(riece-server-keyword-bind server
(let* (selective-display
(coding-system-for-read 'binary)
(coding-system-for-write 'binary)
(process
- (funcall function "IRC" (if server-name
- (format " *IRC*%s" server-name)
- " *IRC*")
+ (funcall function "IRC"
+ (get-buffer-create
+ (if server-name
+ (format " *IRC*%s" server-name)
+ " *IRC*"))
host service)))
(riece-reset-process-buffer process)
+ (setq riece-server-name server-name)
(set-process-sentinel process 'riece-sentinel)
(set-process-filter process 'riece-filter)
(if (or password
(or password
(riece-read-passwd
"Password: ")))))
- (setq riece-reconnect-with-password nil)
(riece-process-send-string process
(format "USER %s * * :%s\r\n"
(user-real-login-name)
(if quit-message
(format "QUIT :%s\r\n" quit-message)
"QUIT\r\n"))
- (delete-process process)
(unless riece-debug
- (kill-buffer (process-buffer process)))))
+ (kill-buffer (process-buffer process))))
+ (delete-process process))
(eval-when-compile
(autoload 'riece-exit "riece"))
(let ((riece-overriding-server-name server-name)
(channels riece-current-channels))
(while channels
- (if (equal (riece-identity-server (car channels))
- server-name)
+ (if (and (car channels)
+ (equal (riece-identity-server (car channels))
+ server-name))
(riece-part-channel (car channels)))
(setq channels (cdr channels)))
(riece-redisplay-buffers))