From 687d04c6ec56d776464d66ce34946e51752c76dd Mon Sep 17 00:00:00 2001 From: ueno Date: Mon, 13 Dec 2004 23:54:02 +0000 Subject: [PATCH] * riece-irc.el (riece-irc-open-server): Send USER command with riece-username if set. * riece-server.el (riece-server-keyword-map): Bind :realname. * riece-options.el (riece-realname): Rename from riece-username. (riece-username): New user option. --- lisp/ChangeLog | 8 ++++++++ lisp/riece-irc.el | 10 ++++++++-- lisp/riece-options.el | 9 +++++++-- lisp/riece-server.el | 1 + 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 51cf921..44d2761 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,13 @@ 2004-12-13 Daiki Ueno + * riece-irc.el (riece-irc-open-server): Send USER command with + riece-username if set. + * riece-server.el (riece-server-keyword-map): Bind :realname. + * riece-options.el (riece-realname): Rename from riece-username. + (riece-username): New user option. + +2004-12-13 Daiki Ueno + * riece-display.el (riece-update-channel-list-indicator): Normalize modeline indicator. diff --git a/lisp/riece-irc.el b/lisp/riece-irc.el index 4126e7d..faa4c56 100644 --- a/lisp/riece-irc.el +++ b/lisp/riece-irc.el @@ -80,8 +80,14 @@ (format "PASS %s\r\n" password))) (riece-process-send-string process (format "USER %s * * :%s\r\n" - (user-real-login-name) - (or username + (if (and username + (not (string-match + "[^\0\r\n @]" + username))) + username + (user-real-login-name)) + (or realname + username "No information given"))) (riece-process-send-string process (format "NICK %s\r\n" nickname)) (with-current-buffer (process-buffer process) diff --git a/lisp/riece-options.el b/lisp/riece-options.el index 48d78a2..5d15c16 100644 --- a/lisp/riece-options.el +++ b/lisp/riece-options.el @@ -196,12 +196,17 @@ way is to put Riece variables on .emacs or file loaded from there." (const :tag "No" nil)) :group 'riece-server) -(defcustom riece-username (or (getenv "IRCNAME") - user-full-name) +(defcustom riece-username nil "Your user name." :type 'string :group 'riece-server) +(defcustom riece-realname (or (getenv "IRCNAME") + user-full-name) + "Your real name." + :type 'string + :group 'riece-server) + (defcustom riece-nickname (or (getenv "IRCNICK") (user-real-login-name)) "Your nickname." diff --git a/lisp/riece-server.el b/lisp/riece-server.el index 04ab199..2defd70 100644 --- a/lisp/riece-server.el +++ b/lisp/riece-server.el @@ -36,6 +36,7 @@ (:service 6667) (:nickname riece-nickname) (:username riece-username) + (:realname riece-realname) (:password) (:function riece-default-open-connection-function) (:coding riece-default-coding-system)) -- 1.7.10.4