diff options
author | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2014-01-22 19:18:43 +0000 |
---|---|---|
committer | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2014-01-22 19:18:43 +0000 |
commit | 22a33228258122fd4623d7e07f2a53b1f94fe25e (patch) | |
tree | cd5ec600d190b0ffcef34b78d6b9ff43031c91fb /modules | |
parent | ffbceb8bcf3ce6d13574faecf62c42cd9fb67b41 (diff) |
- m_names.c:names_non_public_non_secret(): fixed long-standing bug where
users that are on a private/secret channel have been shown in /names
output. Bug introduced in rev 1.60 (CVS) / Tue Jun 28 21:26:06 2005
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@2901 82007160-df01-0410-b94d-b575c5fd34c7
Diffstat (limited to 'modules')
-rw-r--r-- | modules/m_names.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/modules/m_names.c b/modules/m_names.c index 7936084..fe369ad 100644 --- a/modules/m_names.c +++ b/modules/m_names.c @@ -69,7 +69,7 @@ names_non_public_non_secret(struct Client *source_p) { int mlen, tlen, cur_len; int reply_to_send = 0; - int shown_already; + int dont_show = 0; dlink_node *gc2ptr, *lp; struct Client *c2ptr; struct Channel *ch3ptr = NULL; @@ -89,22 +89,25 @@ names_non_public_non_secret(struct Client *source_p) if (!IsClient(c2ptr) || HasUMode(c2ptr, UMODE_INVISIBLE)) continue; - shown_already = 0; + dont_show = 0; - /* We already know the user is not +i. If they are on no common - * channels with source_p, they have not been shown yet. */ + /* + * Don't show a client if they are on a secret channel or they + * are on a channel source_p is on since they have already + * been show earlier. -avalon + */ DLINK_FOREACH(lp, c2ptr->channel.head) { ch3ptr = ((struct Membership *)lp->data)->chptr; - if (IsMember(source_p, ch3ptr)) + if ((ch3ptr->mode.mode & (MODE_PRIVATE|MODE_SECRET)) || IsMember(source_p, ch3ptr)) { - shown_already = 1; + dont_show = 1; break; } } - if (shown_already) + if (dont_show) continue; tlen = strlen(c2ptr->name); |