* COMPILE (riece-install-package): Install *.xpm and *.rb in etc/riece.
[riece] / lisp / riece-000.el
index 12e2d37..4506392 100644 (file)
 ;;; Code:
 
 (require 'riece-misc)
-(require 'riece-filter)                        ;riece-default-handle-message
 (require 'riece-version)
 (require 'riece-commands)              ;riece-command-join
 
 (eval-when-compile
-  (autoload 'riece-default-handle-numeric-reply "riece-filter"))
+  (autoload 'riece-default-handle-numeric-reply "riece-handle"))
 (defun riece-handle-default-000-message (prefix number name string)
   (setq riece-nick-accepted 'ok)
   (riece-default-handle-numeric-reply
   (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-channel identity (nth 1 entry)))
       (setq channel-list (cdr channel-list))))
   (run-hooks 'riece-after-login-hook))