X-Git-Url: https://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Friece-000.el;h=0894b10e6945358e878c79c6bd62699a6d9940e5;hb=a84f069012bb8d6c1917b18a7720f6df5dfc78fd;hp=29001060e7981abd0ddbe69e4b4e007fe77517b2;hpb=64e70a440b4b437091c51f77003eb86686f6fda7;p=riece diff --git a/lisp/riece-000.el b/lisp/riece-000.el index 2900106..0894b10 100644 --- a/lisp/riece-000.el +++ b/lisp/riece-000.el @@ -25,12 +25,11 @@ ;;; 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 @@ -43,6 +42,9 @@ (setq riece-real-server-name prefix riece-real-nickname name riece-real-userhost nil) + ;; Before sending USERHOST, register myself with riece-obarray + ;; because it may take some time. + (riece-get-user name) (riece-send-string (format "USERHOST %s\r\n" riece-real-nickname)) (riece-insert-info (list riece-dialogue-buffer riece-others-buffer) @@ -50,12 +52,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))