diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-01-04 13:02:39 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-01-04 13:02:39 +0100 |
commit | e1976796bf99ddc6f9f8b946b5cdea26e9e5245a (patch) | |
tree | f4219726a050b4483c52a9754d44d5ae240282d8 /src | |
parent | a45db73920c6a3e51e5a19fe697f86dd185d72b4 (diff) |
Show +i users on a channel to opers having the channels/auspex priv who do /NAMES from outside of the chan
Discovered by @Cronus89
Diffstat (limited to 'src')
-rw-r--r-- | src/channels.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/channels.cpp b/src/channels.cpp index 4f63654a5..b5132c8b3 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -772,7 +772,9 @@ void Channel::UserList(User *user) if (!IS_LOCAL(user)) return; - if (this->IsModeSet('s') && !this->HasUser(user) && !user->HasPrivPermission("channels/auspex")) + bool has_privs = user->HasPrivPermission("channels/auspex"); + + if (this->IsModeSet('s') && !this->HasUser(user) && !has_privs) { user->WriteNumeric(ERR_NOSUCHNICK, "%s %s :No such nick/channel",user->nick.c_str(), this->name.c_str()); return; @@ -792,7 +794,7 @@ void Channel::UserList(User *user) { if (i->first->quitting) continue; - if ((!has_user) && (i->first->IsModeSet('i'))) + if ((!has_user) && (i->first->IsModeSet('i')) && (!has_privs)) { /* * user is +i, and source not on the channel, does not show |