From: ueno Date: Sat, 20 Sep 2003 00:41:47 +0000 (+0000) Subject: * riece-server.el (riece-open-server): Display "Logging in to X-Git-Tag: riece-0_1_2~8 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c487f9ad67964186a63b327a416f468735b5aa52;p=elisp%2Friece.git * riece-server.el (riece-open-server): Display "Logging in to XXX..." message. * riece-000.el (riece-handle-001-message): Clear "Logging in to XXX..." message; call riece-after-login-hook. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 65019f7..9b42166 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2003-09-20 Daiki Ueno + + * riece-server.el (riece-open-server): Display "Logging in to + XXX..." message. + * riece-000.el (riece-handle-001-message): Clear "Logging in to + XXX..." message; call riece-after-login-hook. + 2003-09-07 Daiki Ueno * riece-unread.el (riece-unread-after-display-message-function): diff --git a/lisp/riece-000.el b/lisp/riece-000.el index fde11c4..9a442f2 100644 --- a/lisp/riece-000.el +++ b/lisp/riece-000.el @@ -37,13 +37,19 @@ (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")) (setq riece-real-server-name prefix riece-real-nickname name riece-real-userhost nil) (riece-send-string (format "USERHOST %s\r\n" riece-real-nickname)) (riece-insert-info (list riece-dialogue-buffer riece-others-buffer) - (concat (substring string 1) "\n"))) + (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)) + (run-hooks 'riece-after-login-hook)) (defun riece-handle-004-message (prefix number name string) "RPL_MYINFO \" \"" diff --git a/lisp/riece-server.el b/lisp/riece-server.el index 25d67a4..ba66fce 100644 --- a/lisp/riece-server.el +++ b/lisp/riece-server.el @@ -125,22 +125,29 @@ the `riece-server-keyword-map' variable." (riece-process-send-string process string))) (defun riece-open-server (server server-name) - (if (equal server-name "") - (message "Connecting to IRC server...") - (message "Connecting to %s..." server-name)) (riece-server-keyword-bind server - (let* (selective-display - (coding-system-for-read 'binary) - (coding-system-for-write 'binary) - (process + (let (selective-display + (coding-system-for-read 'binary) + (coding-system-for-write 'binary) + process) + (if (equal server-name "") + (message "Connecting to IRC server...") + (message "Connecting to %s..." server-name)) + (setq process (funcall function (riece-server-process-name server-name) (concat " *IRC*" server-name) - host service))) + host service)) + (if (equal server-name "") + (message "Connecting to IRC server...done") + (message "Connecting to %s...done" server-name)) (riece-reset-process-buffer process) (with-current-buffer (process-buffer process) (setq riece-server-name server-name)) (set-process-sentinel process 'riece-sentinel) (set-process-filter process 'riece-filter) + (if (equal server-name "") + (message "Logging in to IRC server...") + (message "Logging in to %s..." server-name)) (if (or password riece-reconnect-with-password) (riece-process-send-string process @@ -159,10 +166,7 @@ the `riece-server-keyword-map' variable." riece-nick-accepted 'sent riece-coding-system coding)) (setq riece-process-list - (cons process riece-process-list)))) - (if (equal server-name "") - (message "Connecting to IRC server...done") - (message "Connecting to %s...done" server-name))) + (cons process riece-process-list))))) (defun riece-reset-process-buffer (process) (save-excursion