From: Daiki Ueno Date: Sun, 14 Dec 2003 05:13:39 +0000 (+0000) Subject: * riece.el (riece): Connect to servers in riece-startup-server-list. X-Git-Url: https://cgit.sxemacs.org/?p=riece;a=commitdiff_plain;h=19ff075fe8afeb2e5c2bfe2f05ea02c67c3c79cc * riece.el (riece): Connect to servers in riece-startup-server-list. * riece-000.el (riece-handle-001-message): Ignore entries in riece-startup-channel-list which doesn't match riece-server-name. * riece-options.el (riece-startup-server-list): New user option. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 850a7d6..66eb8ff 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,12 @@ 2003-12-14 Daiki Ueno + * riece.el (riece): Connect to servers in riece-startup-server-list. + + * riece-000.el (riece-handle-001-message): Ignore entries in + riece-startup-channel-list which doesn't match riece-server-name. + + * riece-options.el (riece-startup-server-list): New user option. + * riece-async.el (riece-async-max-buffer-size): New user option. (riece-async-server-program): Use io/nonblock & IO#syswrite to check whether the write end of pipe (i.e. input to emacs process) diff --git a/lisp/riece-000.el b/lisp/riece-000.el index 12e2d37..a986907 100644 --- a/lisp/riece-000.el +++ b/lisp/riece-000.el @@ -53,12 +53,15 @@ (if (equal riece-server-name "") (message "Logging in to IRC server...done") (message "Logging in to %s...done" riece-server-name)) - (let ((channel-list riece-startup-channel-list)) + (let ((channel-list riece-startup-channel-list) + entry identity) (while channel-list - (if (listp (car channel-list)) - (riece-command-join (riece-parse-identity (car (car channel-list))) - (nth 1 (car channel-list))) - (riece-command-join (riece-parse-identity (car channel-list)))) + (unless (listp (setq entry (car channel-list))) + (setq entry (list (car channel-list)))) + (if (equal (riece-identity-server + (setq identity (riece-parse-identity (car entry)))) + riece-server-name) + (riece-command-join identity (nth 1 entry))) (setq channel-list (cdr channel-list)))) (run-hooks 'riece-after-login-hook)) diff --git a/lisp/riece-options.el b/lisp/riece-options.el index 06c9d84..7c91544 100644 --- a/lisp/riece-options.el +++ b/lisp/riece-options.el @@ -192,6 +192,11 @@ way is to put Riece variables on .emacs or file loaded from there." (list (string :tag "Channel") (string :tag "Key")))) :group 'riece-channel) +(defcustom riece-startup-server-list nil + "A list of servers to connect automatically at startup." + :type '(repeat (string :tag "Server")) + :group 'riece-server) + (defcustom riece-retry-with-new-nickname nil "When nickname has already been in use, grow-tail automatically." :type 'boolean diff --git a/lisp/riece.el b/lisp/riece.el index aff13b9..997db0a 100644 --- a/lisp/riece.el +++ b/lisp/riece.el @@ -286,6 +286,10 @@ If optional argument CONFIRM is non-nil, ask which IRC server to connect." (switch-to-buffer riece-command-buffer) (riece-redisplay-buffers) (riece-open-server riece-server "") + (let ((server-list riece-startup-server-list)) + (while server-list + (riece-command-open-server (car server-list)) + (setq server-list (cdr server-list)))) (run-hooks 'riece-startup-hook) (message "%s" (substitute-command-keys "Type \\[describe-mode] for help"))))