summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/commands/cmd_list.cpp6
-rw-r--r--src/modules/m_safelist.cpp8
2 files changed, 7 insertions, 7 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);
}
diff --git a/src/modules/m_safelist.cpp b/src/modules/m_safelist.cpp
index 524bbcc0f..0c6f7df81 100644
--- a/src/modules/m_safelist.cpp
+++ b/src/modules/m_safelist.cpp
@@ -112,13 +112,13 @@ class ModuleSafeList : public Module
/* Work around mIRC suckyness. YOU SUCK, KHALED! */
if (pcnt == 1)
{
- if (*parameters[0].c_str() == '<')
+ if (parameters[0][0] == '<')
{
maxusers = atoi(parameters[0].c_str()+1);
ServerInstance->Logs->Log("m_safelist",DEBUG,"Max users: %d", maxusers);
pcnt = 0;
}
- else if (*parameters[0].c_str() == '>')
+ else if (parameters[0][0] == '>')
{
minusers = atoi(parameters[0].c_str()+1);
ServerInstance->Logs->Log("m_safelist",DEBUG,"Min users: %d", minusers);
@@ -183,7 +183,7 @@ class ModuleSafeList : public Module
continue;
}
- if ((chan) && (chan->modes[CM_PRIVATE]))
+ if ((chan) && (chan->modes[CM_PRIVATE]) && (!IS_OPER(user)))
{
bool display = (match(chan->name, ld->glob.c_str()) || (*chan->topic && match(chan->topic, ld->glob.c_str())));
if ((users) && (display))
@@ -193,7 +193,7 @@ class ModuleSafeList : public Module
user->WriteServ(std::string(buffer));
}
}
- else if ((chan) && (((!(chan->modes[CM_PRIVATE])) && (!(chan->modes[CM_SECRET]))) || (has_user)))
+ else if ((chan) && ((((!(chan->modes[CM_PRIVATE])) && (!(chan->modes[CM_SECRET])))) || (has_user) || IS_OPER(user)))
{
bool display = (match(chan->name, ld->glob.c_str()) || (*chan->topic && match(chan->topic, ld->glob.c_str())));
if ((users) && (display))