repo: ngircd
action: commit
revision: 
path_from: 
revision_from: e273bd226a10d3b6165763d533a8df8af3d3d375:
path_to: 
revision_to: 
git.thebackupbox.net
ngircd
git clone git://git.thebackupbox.net/ngircd
commit e273bd226a10d3b6165763d533a8df8af3d3d375
Author: Mantas Mikulėnas 
Date:   Mon Jan 20 14:25:11 2014 +0200

    Show account name in WHOIS

    This uses the same numeric as Charybdis and ircu families.

diff --git a/src/ngircd/irc-info.c b/src/ngircd/irc-info.c
index aa98a5b560b163f4b96a5b4c7b1a20b7f4f6f2f3..
index ..cd5e45c12a28b2d834a326977aab906b610b955c 100644
--- a/src/ngircd/irc-info.c
+++ b/src/ngircd/irc-info.c
@@ -401,6 +401,13 @@ IRC_WHOIS_SendReply(CLIENT *Client, CLIENT *from, CLIENT *c)
 				Client_ID(from), Client_ID(c)))
 		return DISCONNECTED;

+	/* Account name metadata? */
+	if (Client_AccountName(c) &&
+	    !IRC_WriteStrClient(from, RPL_WHOISLOGGEDIN_MSG,
+				Client_ID(from), Client_ID(c),
+				Client_AccountName(c)))
+		return DISCONNECTED;
+
 	/* Local client and requester is the user itself or an IRC Op? */
 	if (Client_Conn(c) > NONE &&
 	    (from == c || (!Conf_MorePrivacy && Client_HasMode(from, 'o')))) {
diff --git a/src/ngircd/messages.h b/src/ngircd/messages.h
index f3a0ba442ac97ee82dd950607259b71302b5e526..
index ..a56bf866ed35810fa0e1c73d7c98a4fd67d772ab 100644
--- a/src/ngircd/messages.h
+++ b/src/ngircd/messages.h
@@ -71,6 +71,7 @@
 #define RPL_LISTEND_MSG			"323 %s :End of LIST"
 #define RPL_CHANNELMODEIS_MSG		"324 %s %s +%s"
 #define RPL_CREATIONTIME_MSG		"329 %s %s %ld"
+#define RPL_WHOISLOGGEDIN_MSG		"330 %s %s %s :is logged in as"
 #define RPL_NOTOPIC_MSG			"331 %s %s :No topic is set"
 #define RPL_TOPIC_MSG			"332 %s %s :%s"
 #define RPL_TOPICSETBY_MSG		"333 %s %s %s %u"

-----END OF PAGE-----