From: Alexander Barton Date: Tue, 21 Jan 2014 22:04:59 +0000 (-0800) Subject: Merge pull request #5 from grawity/accountname-whois X-Git-Tag: rel-22-rc1~57 X-Git-Url: https://arthur.barton.de/gitweb/?a=commitdiff_plain;h=4cb36e370ec37554ff0ba3e26001b6bef5e4563d;hp=3b24ebf122fd8661437be244eb851d8f7d04408f;p=ngircd.git Merge pull request #5 from grawity/accountname-whois Show account name in WHOIS --- diff --git a/src/ngircd/irc-info.c b/src/ngircd/irc-info.c index aa98a5b5..cd5e45c1 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 f3a0ba44..a56bf866 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"