diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-05-11 00:27:55 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-05-11 00:27:55 +0000 |
commit | c74d20768b577e77042548aa6756dd1eaa4eb776 (patch) | |
tree | dd5583c5e2f52fc499860be6bc13b006d5d3e9fa /src/commands | |
parent | 5e747af4d288366ddabbd980f8d4f4c95a20479b (diff) |
Show +sp channels to opers correctly
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9702 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/commands')
-rw-r--r-- | src/commands/cmd_list.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/commands/cmd_list.cpp b/src/commands/cmd_list.cpp index 518aee62f..6c95d7e8d 100644 --- a/src/commands/cmd_list.cpp +++ b/src/commands/cmd_list.cpp @@ -52,7 +52,7 @@ CmdResult CommandList::Handle (const std::vector<std::string>& parameters, User if (too_many || too_few) continue; - if (parameters.size() && parameters[0][0] != '<' && parameters[0][0] == '>') + if (parameters.size() && (parameters[0][0] != '<' || parameters[0][0] == '>')) { if (!match(i->second->name, parameters[0].c_str()) && !match(i->second->topic, parameters[0].c_str())) continue; @@ -60,13 +60,13 @@ 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); - if ((i->second->IsModeSet('p')) && (!n)) + if (!IS_OPER(user) && (i->second->IsModeSet('p')) && (!n)) { user->WriteNumeric(322, "%s *",user->nick); } else { - if (((!(i->second->IsModeSet('p'))) && (!(i->second->IsModeSet('s')))) || (n)) + if (IS_OPER(user) || (((!(i->second->IsModeSet('p'))) && (!(i->second->IsModeSet('s')))) || (n))) { user->WriteNumeric(322, "%s %s %ld :[+%s] %s",user->nick,i->second->name,users,i->second->ChanModes(n),i->second->topic); } |