diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-10-18 16:52:53 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-10-18 16:52:53 +0000 |
commit | 3c055715a27fead89fab680e446f166e2da7a68a (patch) | |
tree | 8db973f43635b0b6d19dfc4d609c2132939a9eeb /src/commands | |
parent | dd54c42f5f27dcee1cad7fe8a606be5cf8442c7c (diff) |
Implement channels/auspex priv for /names and /list.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10666 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/commands')
-rw-r--r-- | src/commands/cmd_list.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/commands/cmd_list.cpp b/src/commands/cmd_list.cpp index f0e1a143e..9ecbea6a6 100644 --- a/src/commands/cmd_list.cpp +++ b/src/commands/cmd_list.cpp @@ -58,15 +58,18 @@ CmdResult CommandList::Handle (const std::vector<std::string>& parameters, User } // if the channel is not private/secret, OR the user is on the channel anyway - bool n = (i->second->HasUser(user) || IS_OPER(user)); - if (!IS_OPER(user) && (i->second->IsModeSet('p')) && (!n)) + bool n = (i->second->HasUser(user) || user->HasPrivPermission("channels/auspex")); + + if (!n && i->second->IsModeSet('p')) { + /* Channel is +p and user is outside/not privileged */ user->WriteNumeric(322, "%s * %ld :",user->nick.c_str(), users); } else { - if (IS_OPER(user) || (((!(i->second->IsModeSet('p'))) && (!(i->second->IsModeSet('s')))) || (n))) + if (n || !i->second->IsModeSet('s')) { + /* User is in the channel/privileged, channel is not +s */ user->WriteNumeric(322, "%s %s %ld :[+%s] %s",user->nick.c_str(),i->second->name.c_str(),users,i->second->ChanModes(n),i->second->topic.c_str()); } } |