From e671d82d066063c5c7b02169b5617c58361bf42c Mon Sep 17 00:00:00 2001 From: michael Date: Sun, 27 Oct 2013 16:32:33 +0000 Subject: - Admins may now see +s channels a user is in with /WHOIS git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@2509 82007160-df01-0410-b94d-b575c5fd34c7 --- modules/m_whois.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/m_whois.c b/modules/m_whois.c index 8609d82..74149a5 100644 --- a/modules/m_whois.c +++ b/modules/m_whois.c @@ -69,10 +69,11 @@ whois_person(struct Client *source_p, struct Client *target_p) DLINK_FOREACH(lp, target_p->channel.head) { const struct Membership *ms = lp->data; + int show = ShowChannel(source_p, ms->chptr); - if (ShowChannel(source_p, ms->chptr)) + if (show || HasUMode(source_p, UMODE_ADMIN)) { - if ((cur_len + 3 + strlen(ms->chptr->chname) + 1) > (IRCD_BUFSIZE - 2)) + if ((cur_len + 4 + strlen(ms->chptr->chname) + 1) > (IRCD_BUFSIZE - 2)) { *(t - 1) = '\0'; sendto_one(source_p, "%s", buf); @@ -80,7 +81,8 @@ whois_person(struct Client *source_p, struct Client *target_p) t = buf + mlen; } - tlen = sprintf(t, "%s%s ", get_member_status(ms, 1), ms->chptr->chname); + tlen = sprintf(t, "%s%s%s ", show ? "" : "~", get_member_status(ms, 1), + ms->chptr->chname); t += tlen; cur_len += tlen; reply_to_send = 1; -- cgit