Allow opers to see secret (+s) channels in LIST command

As long as 'MorePrivacy' isn't enabled in the configuration file, local
IRC operators can see secret (+s) channels when using the LIST command.

Closes bug #136.
This commit is contained in:
DNS777 2012-09-25 12:55:07 +02:00 committed by Alexander Barton
parent b730b64bbe
commit 62a07596d6
1 changed files with 2 additions and 1 deletions

View File

@ -669,7 +669,8 @@ IRC_LIST( CLIENT *Client, REQUEST *Req )
if (MatchCaseInsensitive(pattern, Channel_Name(chan))) { if (MatchCaseInsensitive(pattern, Channel_Name(chan))) {
/* Gotcha! */ /* Gotcha! */
if (!strchr(Channel_Modes(chan), 's') if (!strchr(Channel_Modes(chan), 's')
|| Channel_IsMemberOf(chan, from)) { || Channel_IsMemberOf(chan, from)
|| (!Conf_MorePrivacy && Client_OperByMe(Client))) {
if (IRC_CheckListTooBig(from, count, if (IRC_CheckListTooBig(from, count,
MAX_RPL_LIST, MAX_RPL_LIST,
"LIST")) "LIST"))