From c74d20768b577e77042548aa6756dd1eaa4eb776 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 11 May 2008 00:27:55 +0000 Subject: Show +sp channels to opers correctly git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9702 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/commands/cmd_list.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/commands') 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& 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& 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); } -- cgit v1.2.3