mirror of
https://github.com/osmarks/ngircd.git
synced 2025-01-22 05:16:52 +00:00
Allow ircops to use WHO on any channel.
This commit is contained in:
parent
0652c99b39
commit
24f956abf7
@ -138,7 +138,7 @@ who_flags_qualifier(CLIENT *Client, const char *chan_user_modes,
|
|||||||
static bool
|
static bool
|
||||||
IRC_WHO_Channel(CLIENT *Client, CHANNEL *Chan, bool OnlyOps)
|
IRC_WHO_Channel(CLIENT *Client, CHANNEL *Chan, bool OnlyOps)
|
||||||
{
|
{
|
||||||
bool is_visible, is_member, is_ircop;
|
bool is_visible, is_member, is_ircop, is_oper;
|
||||||
CL2CHAN *cl2chan;
|
CL2CHAN *cl2chan;
|
||||||
char flags[10];
|
char flags[10];
|
||||||
CLIENT *c;
|
CLIENT *c;
|
||||||
@ -148,9 +148,10 @@ IRC_WHO_Channel(CLIENT *Client, CHANNEL *Chan, bool OnlyOps)
|
|||||||
assert( Chan != NULL );
|
assert( Chan != NULL );
|
||||||
|
|
||||||
is_member = Channel_IsMemberOf(Chan, Client);
|
is_member = Channel_IsMemberOf(Chan, Client);
|
||||||
|
is_oper = Client_HasMode(Client, 'o');
|
||||||
|
|
||||||
/* Secret channel? */
|
/* Secret channel? */
|
||||||
if (!is_member && Channel_HasMode(Chan, 's'))
|
if (!is_member && !is_oper && Channel_HasMode(Chan, 's'))
|
||||||
return IRC_WriteStrClient(Client, RPL_ENDOFWHO_MSG,
|
return IRC_WriteStrClient(Client, RPL_ENDOFWHO_MSG,
|
||||||
Client_ID(Client), Channel_Name(Chan));
|
Client_ID(Client), Channel_Name(Chan));
|
||||||
|
|
||||||
@ -163,7 +164,7 @@ IRC_WHO_Channel(CLIENT *Client, CHANNEL *Chan, bool OnlyOps)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
is_visible = !Client_HasMode(c, 'i');
|
is_visible = !Client_HasMode(c, 'i');
|
||||||
if (is_member || is_visible) {
|
if (is_member || is_visible || is_oper) {
|
||||||
memset(flags, 0, sizeof(flags));
|
memset(flags, 0, sizeof(flags));
|
||||||
|
|
||||||
if (Client_HasMode(c, 'a'))
|
if (Client_HasMode(c, 'a'))
|
||||||
|
Loading…
Reference in New Issue
Block a user