From d4438b8ec9eaba90c155b35ec0c960641987a9c3 Mon Sep 17 00:00:00 2001 From: "Kevin L. Mitchell" Date: Fri, 20 Apr 2001 20:56:56 +0000 Subject: [PATCH] Author: Kev Log message: Hide server name for /who, too; allow users to see their own server name in /whois. Changes still untested... git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@427 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- ChangeLog | 12 ++++++++++++ include/ircd_policy.h | 1 + ircd/m_who.c | 10 ++++++++-- ircd/m_whois.c | 2 +- 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 11e3e73..3cc1fa8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2001-04-20 Kevin L. Mitchell + + * ircd/m_whois.c (do_whois): display proper server name if the + user is looking up himself + + * ircd/m_who.c (m_who): disable match by servername or display of + server names by non-opers + + * include/ircd_policy.h: add define for + HEAD_IN_SAND_WHO_SERVERNAME to cover full intent of sub-motion 15 + of CFV 165 + 2001-04-18 Kevin L. Mitchell * ircd/s_conf.c: keep the $R in memory so we can see it clearly diff --git a/include/ircd_policy.h b/include/ircd_policy.h index de4ac4a..21e8b62 100644 --- a/include/ircd_policy.h +++ b/include/ircd_policy.h @@ -120,5 +120,6 @@ */ #define HEAD_IN_SAND_WHOIS_SERVERNAME +#define HEAD_IN_SAND_WHO_SERVERNAME #endif /* INCLUDED_ircd_policy_h */ diff --git a/ircd/m_who.c b/ircd/m_who.c index ecb27b4..a2d8718 100644 --- a/ircd/m_who.c +++ b/ircd/m_who.c @@ -210,7 +210,10 @@ int m_who(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) continue; case 's': case 'S': - matchsel |= WHO_FIELD_SER; +#ifdef HEAD_IN_SAND_WHO_SERVERNAME + if (IsAnOper(sptr)) +#endif + matchsel |= WHO_FIELD_SER; continue; case 'r': case 'R': @@ -256,7 +259,10 @@ int m_who(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) break; case 's': case 'S': - fields |= WHO_FIELD_SER; +#ifdef HEAD_IN_SAND_WHO_SERVERNAME + if (IsAnOper(sptr)) +#endif + fields |= WHO_FIELD_SER; break; case 't': case 'T': diff --git a/ircd/m_whois.c b/ircd/m_whois.c index 51d0354..0847f53 100644 --- a/ircd/m_whois.c +++ b/ircd/m_whois.c @@ -190,7 +190,7 @@ static void do_whois(struct Client* sptr, struct Client *acptr) } #ifdef HEAD_IN_SAND_WHOIS_SERVERNAME - if (!IsOper(sptr)) + if (!IsOper(sptr) || sptr == a2cptr) send_reply(sptr, RPL_WHOISSERVER, name, "*.undernet.org", "The Undernet Underworld"); else -- 2.20.1