X-Git-Url: https://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Friece-000.el;h=277cae5bba87ef65de0357c5ddc8d0fd816ff516;hb=66678c807a37f7228a260f530a92e13c8658ec8d;hp=12e2d37d9e9612a59bbe9cae43c9779294ac3877;hpb=d70fffc24b829817f3da9da9363ca690dd862640;p=riece diff --git a/lisp/riece-000.el b/lisp/riece-000.el index 12e2d37..277cae5 100644 --- a/lisp/riece-000.el +++ b/lisp/riece-000.el @@ -19,18 +19,17 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; 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 @@ -39,7 +38,7 @@ (defun riece-handle-001-message (prefix number name string) "RPL_WELCOME \"Welcome to the Internet Relay Network !@\"" (if riece-real-server-name - (error "Already registered")) + (error (riece-mcat "Already registered"))) (setq riece-real-server-name prefix riece-real-nickname name riece-real-userhost nil) @@ -51,14 +50,17 @@ (list riece-dialogue-buffer riece-others-buffer) (concat (substring string 1) "\n")) (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)) + (message (riece-mcat "Logging in to IRC server...done")) + (message (riece-mcat "Logging in to %s...done") riece-server-name)) + (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))