* riece.el (riece): Connect to servers in riece-startup-server-list.
authorDaiki Ueno <ueno@unixuser.org>
Sun, 14 Dec 2003 05:13:39 +0000 (05:13 +0000)
committerDaiki Ueno <ueno@unixuser.org>
Sun, 14 Dec 2003 05:13:39 +0000 (05:13 +0000)
* 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.

lisp/ChangeLog
lisp/riece-000.el
lisp/riece-options.el
lisp/riece.el

index 850a7d6..66eb8ff 100644 (file)
@@ -1,5 +1,12 @@
 2003-12-14  Daiki Ueno  <ueno@unixuser.org>
 
 2003-12-14  Daiki Ueno  <ueno@unixuser.org>
 
+       * 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)
        * 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)
index 12e2d37..a986907 100644 (file)
   (if (equal riece-server-name "")
       (message "Logging in to IRC server...done")
     (message "Logging in to %s...done" riece-server-name))
   (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
     (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))
 
       (setq channel-list (cdr channel-list))))
   (run-hooks 'riece-after-login-hook))
 
index 06c9d84..7c91544 100644 (file)
@@ -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)
 
                         (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
 (defcustom riece-retry-with-new-nickname nil
   "When nickname has already been in use, grow-tail automatically."
   :type 'boolean
index aff13b9..997db0a 100644 (file)
@@ -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 "")
     (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"))))
     (run-hooks 'riece-startup-hook)
     (message "%s" (substitute-command-keys
                   "Type \\[describe-mode] for help"))))