From 5fdbc1ebfb12bf4b40a4fa5c22dc3c1be92a57c6 Mon Sep 17 00:00:00 2001 From: Sam Dodrill Date: Wed, 28 May 2014 17:03:09 -0700 Subject: [PATCH] modules/m_whois: Server hiding in WHOIS --- modules/m_whois.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/m_whois.c b/modules/m_whois.c index dd1b7ee..a5b475e 100644 --- a/modules/m_whois.c +++ b/modules/m_whois.c @@ -307,9 +307,14 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy) if(cur_len > mlen + extra_space) sendto_one(source_p, "%s", buf); - sendto_one_numeric(source_p, RPL_WHOISSERVER, form_str(RPL_WHOISSERVER), - target_p->name, target_p->servptr->name, - target_p->servptr->info); + if(IsOper(source_p)) { + sendto_one_numeric(source_p, RPL_WHOISSERVER, form_str(RPL_WHOISSERVER), + target_p->name, target_p->servptr->name, + target_p->servptr->info); + } else { + sendto_one_numeric(source_p, RPL_WHOISSERVER, form_str(RPL_WHOISSERVER), + target_p->name, "irc.server", "An IRC server"); + } if(target_p->user->away) sendto_one_numeric(source_p, RPL_AWAY, form_str(RPL_AWAY),