* riece-options.el (riece-startup-channel-list): Revive.
authorDaiki Ueno <ueno@unixuser.org>
Sat, 20 Sep 2003 00:55:03 +0000 (00:55 +0000)
committerDaiki Ueno <ueno@unixuser.org>
Sat, 20 Sep 2003 00:55:03 +0000 (00:55 +0000)
* riece-000.el (riece-handle-001-message): Process
riece-startup-channel-list.

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

index 9b42166..81718f0 100644 (file)
@@ -1,5 +1,9 @@
 2003-09-20  Daiki Ueno  <ueno@unixuser.org>
 
+       * riece-options.el (riece-startup-channel-list): Revive.
+       * riece-000.el (riece-handle-001-message): Process
+       riece-startup-channel-list.
+
        * riece-server.el (riece-open-server): Display "Logging in to
        XXX..." message.
        * riece-000.el (riece-handle-001-message): Clear "Logging in to
index 9a442f2..2f7c713 100644 (file)
   (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))
+    (while channel-list
+      (if (listp (car channel-list))
+         (riece-command-join (car (car channel-list))
+                             (nth 1 (car channel-list)))
+       (riece-command-join (car channel-list)))
+      (setq channel-list (cdr channel-list))))
   (run-hooks 'riece-after-login-hook))
 
 (defun riece-handle-004-message (prefix number name string)
index d40dedd..44dfc92 100644 (file)
@@ -182,6 +182,12 @@ way is to put Riece variables on .emacs or file loaded from there."
   :type 'string
   :group 'riece-server)
 
+(defcustom riece-startup-channel-list nil
+  "A list of channels to join automatically at startup."
+  :type '(repeat (choice (string :tag "Channel")
+                        (list (string :tag "Channel") (string :tag "Key"))))
+  :group 'riece-channel)
+
 (defcustom riece-retry-with-new-nickname nil
   "When nickname has already been in use, grow-tail automatically."
   :type 'boolean