X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Friece-irc.el;h=631a531ec56e9e3562cf77c01ac4860d042b10d9;hb=d464dd4cda287ad1d4722ddf565b60ebefdc3471;hp=f44e199b6689c7ba59dfa34754b9ec314861a808;hpb=f81c96b70578151cba163923c13a49bafe8891e4;p=elisp%2Friece.git diff --git a/lisp/riece-irc.el b/lisp/riece-irc.el index f44e199..631a531 100644 --- a/lisp/riece-irc.el +++ b/lisp/riece-irc.el @@ -19,8 +19,8 @@ ;; 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: @@ -36,10 +36,16 @@ (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)) + (condition-case error + (setq process + (funcall function (riece-server-process-name server-name) + (concat " *IRC*" server-name) + host service)) + (error + (if (equal server-name "") + (message "Connecting to IRC server...failed: %S" error) + (message "Connecting to %s...failed: %S" server-name error)) + (signal (car error) (cdr error)))) (if (equal server-name "") (message "Connecting to IRC server...done") (message "Connecting to %s...done" server-name)) @@ -63,8 +69,7 @@ (quit (if (equal server-name "") (message "Password: Quit") - (message (format "Password for %s: Quit" - server-name))) + (message "Password for %s: Quit" server-name)) 'quit))) (setq riece-reconnect-with-password nil))) (if (eq password 'quit) @@ -74,8 +79,9 @@ (format "PASS %s\r\n" password))) (riece-process-send-string process (format "USER %s * * :%s\r\n" - (user-real-login-name) (or username + (user-real-login-name)) + (or realname "No information given"))) (riece-process-send-string process (format "NICK %s\r\n" nickname)) (with-current-buffer (process-buffer process) @@ -91,9 +97,19 @@ (if (rassq process riece-server-process-alist) (delete-process process))) process)) - (riece-process-send-string process - (if message - (format "QUIT :%s\r\n" message) - "QUIT\r\n"))) + (let ((server-name (with-current-buffer (process-buffer process) + riece-server-name))) + (if (equal server-name "") + (message "Sending QUIT...") + (message "Sending QUIT to \"%s\"..." server-name)) + (riece-process-send-string process + (if message + (format "QUIT :%s\r\n" message) + "QUIT\r\n")) + (if (equal server-name "") + (message "Sending QUIT...done") + (message "Sending QUIT to \"%s\"...done" server-name)))) -(provide 'riece-irc) \ No newline at end of file +(provide 'riece-irc) + +;;; riece-irc.el ends here