From d512f79a6afebd7ac060ff0e20c3bb89593f1f82 Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Sun, 25 Dec 2011 14:29:03 +0100 Subject: [PATCH] - Show account name in /WHOIS, for ESVID-capable services packages, patch from nenotopia (#3966). --- Changes | 2 ++ include/numeric.h | 3 +++ src/modules/m_whois.c | 7 +++++++ src/s_err.c | 2 +- 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index d8db40abe..7695625fd 100644 --- a/Changes +++ b/Changes @@ -2330,3 +2330,5 @@ now store a string (of max NICKLEN size) as service stamp. See protoctl.txt and serverprotocol.html in doc/technical for more information. Patch from nenotopia (#3966). +- Show account name in /WHOIS, for ESVID-capable services packages, patch + from nenotopia (#3966). diff --git a/include/numeric.h b/include/numeric.h index 3b347b842..b7c3b0827 100644 --- a/include/numeric.h +++ b/include/numeric.h @@ -180,6 +180,9 @@ #define RPL_LISTEND 323 #define RPL_CHANNELMODEIS 324 #define RPL_CREATIONTIME 329 + +#define RPL_WHOISLOGGEDIN 330 /* ircu/charybdis-family --nenolod */ + #define RPL_NOTOPIC 331 #define RPL_TOPIC 332 #define RPL_TOPICWHOTIME 333 diff --git a/src/modules/m_whois.c b/src/modules/m_whois.c index 7c14fd380..16ea5eaec 100644 --- a/src/modules/m_whois.c +++ b/src/modules/m_whois.c @@ -321,6 +321,13 @@ DLLFUNC int m_whois(aClient *cptr, aClient *sptr, int parc, char *parv[]) me.name, RPL_WHOISSPECIAL, parv[0], name, acptr->user->swhois); + /* + * display services account name if it's actually a services account name and + * not a legacy timestamp. --nenolod + */ + if (!isdigit(*user->svid) && *user->svid != '*') + sendto_one(sptr, rpl_str(RPL_WHOISLOGGEDIN), me.name, parv[0], name, user->svid); + /* * Fix /whois to not show idle times of * global opers to anyone except another diff --git a/src/s_err.c b/src/s_err.c index 4a963689d..80d30a2db 100644 --- a/src/s_err.c +++ b/src/s_err.c @@ -367,7 +367,7 @@ static char *replies[] = { /* 327 */ NULL, /* Used */ /* 328 */ NULL, /* bahamut, austhex */ /* 329 RPL_CREATIONTIME */ ":%s 329 %s %s %lu", -/* 330 */ NULL, /* Used */ +/* 330 RPL_WHOISLOGGEDIN */ ":%s 330 %s %s %s :is logged in as", /* 331 RPL_NOTOPIC */ ":%s 331 %s %s :No topic is set.", /* 332 RPL_TOPIC */ ":%s 332 %s %s :%s", /* 333 RPL_TOPICWHOTIME */ ":%s 333 %s %s %s %lu",