projects
/
ircu2.10.12-pk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tidied up m_relay.c
[ircu2.10.12-pk.git]
/
ircd
/
m_names.c
diff --git
a/ircd/m_names.c
b/ircd/m_names.c
index eda82851e847950ac54db87f858894092b86a12a..1951922084696784a743848495bad15e328af11f 100644
(file)
--- a/
ircd/m_names.c
+++ b/
ircd/m_names.c
@@
-141,8
+141,11
@@
void do_names(struct Client* sptr, struct Channel* chptr, int filter)
flag = 1;
needs_space = 0;
flag = 1;
needs_space = 0;
- if (!ShowChannel(sptr, chptr)) /* Don't list private channels unless we are on them. */
+ if (!ShowChannel(sptr, chptr)) { /* Don't list private channels unless we are on them. */
+ if (filter&NAMES_EON)
+ send_reply(sptr, RPL_ENDOFNAMES, chptr->chname);
return;
return;
+ }
/* Iterate over all channel members, and build up the list. */
/* Iterate over all channel members, and build up the list. */
@@
-167,7
+170,7
@@
void do_names(struct Client* sptr, struct Channel* chptr, int filter)
if (IsInvisibleJoin(member) && member->user != sptr)
continue;
if (IsInvisibleJoin(member) && member->user != sptr)
continue;
- if (!IsChanOp(member) && !HasVoice(member) && member->user != sptr && (filter & NAMES_OPS))
+ if (!IsChanOp
OrHalfOp
(member) && !HasVoice(member) && member->user != sptr && (filter & NAMES_OPS))
continue;
if (needs_space)
continue;
if (needs_space)
@@
-177,6
+180,8
@@
void do_names(struct Client* sptr, struct Channel* chptr, int filter)
buf[idx++] = '!';
else if (IsChanOp(member))
buf[idx++] = '@';
buf[idx++] = '!';
else if (IsChanOp(member))
buf[idx++] = '@';
+ else if (IsHalfOp(member))
+ buf[idx++] = '%';
else if (HasVoice(member))
buf[idx++] = '+';
strcpy(buf + idx, cli_name(c2ptr));
else if (HasVoice(member))
buf[idx++] = '+';
strcpy(buf + idx, cli_name(c2ptr));
@@
-311,7
+316,7
@@
int m_names(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
* Special Case 2: User is on this channel, requesting full names list.
* (As performed with each /join) - ** High frequency usage **
*/
* Special Case 2: User is on this channel, requesting full names list.
* (As performed with each /join) - ** High frequency usage **
*/
- do_names(sptr, chptr, showingdelayed|NAMES_ALL|NAMES_EON);
+ do_names(sptr, chptr, showingdelayed|NAMES_ALL|NAMES_EON
|((chptr->mode.mode & MODE_AUDITORIUM) && !(member->status & MODE_CHANOP) ? NAMES_OPS : 0)
);
}
else
{
}
else
{
@@
-319,7
+324,7
@@
int m_names(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
* Special Case 3: User isn't on this channel, show all visible users, in
* non secret channels.
*/
* Special Case 3: User isn't on this channel, show all visible users, in
* non secret channels.
*/
- do_names(sptr, chptr, showingdelayed|NAMES_VIS|NAMES_EON);
+ do_names(sptr, chptr, showingdelayed|NAMES_VIS|NAMES_EON
|((chptr->mode.mode & MODE_AUDITORIUM) ? NAMES_OPS : 0)
);
}
}
else
}
}
else