diff options
author | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2013-10-27 16:32:33 +0000 |
---|---|---|
committer | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2013-10-27 16:32:33 +0000 |
commit | e671d82d066063c5c7b02169b5617c58361bf42c (patch) | |
tree | d042b9a9da6b2f0c06a06b88aabb7df21c356ecb | |
parent | 8df8ba51df75d670df08e9af95b5ec20053c6a45 (diff) |
- 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
-rw-r--r-- | modules/m_whois.c | 8 |
1 files 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; |