summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/commands/cs_access.cpp2
-rw-r--r--modules/commands/cs_akick.cpp10
-rw-r--r--modules/commands/cs_flags.cpp2
-rw-r--r--modules/commands/cs_xop.cpp2
4 files changed, 14 insertions, 2 deletions
diff --git a/modules/commands/cs_access.cpp b/modules/commands/cs_access.cpp
index d5f934862..309105998 100644
--- a/modules/commands/cs_access.cpp
+++ b/modules/commands/cs_access.cpp
@@ -518,6 +518,8 @@ class CommandCSAccess : public Command
bool has_access = false;
if (source.HasPriv("chanserv/access/modify"))
has_access = true;
+ else if (is_list && source.HasPriv("chanserv/access/list"))
+ has_access = true;
else if (is_list && source.AccessFor(ci).HasPriv("ACCESS_LIST"))
has_access = true;
else if (source.AccessFor(ci).HasPriv("ACCESS_CHANGE"))
diff --git a/modules/commands/cs_akick.cpp b/modules/commands/cs_akick.cpp
index 1fac25335..03db4c623 100644
--- a/modules/commands/cs_akick.cpp
+++ b/modules/commands/cs_akick.cpp
@@ -441,9 +441,17 @@ class CommandCSAKick : public Command
return;
}
+ bool is_list = cmd.equals_ci("LIST") || cmd.equals_ci("VIEW");
+
+ bool has_access = false;
+ if (source.AccessFor(ci).HasPriv("AKICK") || source.HasPriv("chanserv/access/modify"))
+ has_access = true;
+ else if (is_list && source.HasPriv("chanserv/access/list"))
+ has_access = true;
+
if (mask.empty() && (cmd.equals_ci("ADD") || cmd.equals_ci("DEL")))
this->OnSyntaxError(source, cmd);
- else if (!source.AccessFor(ci).HasPriv("AKICK") && !source.HasPriv("chanserv/access/modify"))
+ else if (!has_access)
source.Reply(ACCESS_DENIED);
else if (!cmd.equals_ci("LIST") && !cmd.equals_ci("VIEW") && !cmd.equals_ci("ENFORCE") && Anope::ReadOnly)
source.Reply(_("Sorry, channel autokick list modification is temporarily disabled."));
diff --git a/modules/commands/cs_flags.cpp b/modules/commands/cs_flags.cpp
index 5f9e070fc..cb2e1fd9f 100644
--- a/modules/commands/cs_flags.cpp
+++ b/modules/commands/cs_flags.cpp
@@ -388,6 +388,8 @@ class CommandCSFlags : public Command
bool has_access = false;
if (source.HasPriv("chanserv/access/modify"))
has_access = true;
+ else if (is_list && source.HasPriv("chanserv/access/list"))
+ has_access = true;
else if (is_list && source.AccessFor(ci).HasPriv("ACCESS_LIST"))
has_access = true;
else if (source.AccessFor(ci).HasPriv("ACCESS_CHANGE"))
diff --git a/modules/commands/cs_xop.cpp b/modules/commands/cs_xop.cpp
index 340369901..bf86c06ce 100644
--- a/modules/commands/cs_xop.cpp
+++ b/modules/commands/cs_xop.cpp
@@ -365,7 +365,7 @@ class CommandCSXOP : public Command
AccessGroup access = source.AccessFor(ci);
- if (!access.HasPriv("ACCESS_LIST") && !source.HasCommand("chanserv/access/list"))
+ if (!access.HasPriv("ACCESS_LIST") && !source.HasPriv("chanserv/access/list"))
{
source.Reply(ACCESS_DENIED);
return;