summaryrefslogtreecommitdiff
path: root/modules/commands/cs_set.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-04-05 16:27:12 -0500
committerAdam <Adam@anope.org>2013-04-05 16:27:12 -0500
commita5b8788014dbc466f392a256901a93588958f35e (patch)
tree0e71df436299b4150a6b11fed796ac97bd7382d2 /modules/commands/cs_set.cpp
parent3cc7950c4b8ff7bec312ab6acd7bd6a203777b0a (diff)
Made the securefounder checks in cs_set more consistent
Diffstat (limited to 'modules/commands/cs_set.cpp')
-rw-r--r--modules/commands/cs_set.cpp25
1 files changed, 5 insertions, 20 deletions
diff --git a/modules/commands/cs_set.cpp b/modules/commands/cs_set.cpp
index 7c17a3769..f20866e2a 100644
--- a/modules/commands/cs_set.cpp
+++ b/modules/commands/cs_set.cpp
@@ -345,13 +345,7 @@ class CommandCSSetFounder : public Command
if (MOD_RESULT == EVENT_STOP)
return;
- if (MOD_RESULT != EVENT_ALLOW && source.permission.empty() && !source.AccessFor(ci).HasPriv("SET"))
- {
- source.Reply(ACCESS_DENIED);
- return;
- }
-
- if (source.permission.empty() && (ci->HasExt("SECUREFOUNDER") ? !source.IsFounder(ci) : !source.AccessFor(ci).HasPriv("FOUNDER")))
+ if (MOD_RESULT != EVENT_ALLOW && source.permission.empty() && (ci->HasExt("SECUREFOUNDER") ? !source.IsFounder(ci) : !source.AccessFor(ci).HasPriv("FOUNDER")))
{
source.Reply(ACCESS_DENIED);
return;
@@ -835,7 +829,7 @@ class CommandCSSetSecureFounder : public Command
if (MOD_RESULT == EVENT_STOP)
return;
- if (MOD_RESULT != EVENT_ALLOW && source.permission.empty() && !source.AccessFor(ci).HasPriv("SET"))
+ if (MOD_RESULT != EVENT_ALLOW && source.permission.empty() && (ci->HasExt("SECUREFOUNDER") ? !source.IsFounder(ci) : !source.AccessFor(ci).HasPriv("FOUNDER")))
{
source.Reply(ACCESS_DENIED);
return;
@@ -1017,19 +1011,10 @@ class CommandCSSetSuccessor : public Command
if (MOD_RESULT == EVENT_STOP)
return;
- if (MOD_RESULT != EVENT_ALLOW && source.permission.empty())
+ if (MOD_RESULT != EVENT_ALLOW && source.permission.empty() && (ci->HasExt("SECUREFOUNDER") ? !source.IsFounder(ci) : !source.AccessFor(ci).HasPriv("FOUNDER")))
{
- if (!source.AccessFor(ci).HasPriv("SET"))
- {
- source.Reply(ACCESS_DENIED);
- return;
- }
-
- if (ci->HasExt("SECUREFOUNDER") ? !source.IsFounder(ci) : !source.AccessFor(ci).HasPriv("FOUNDER"))
- {
- source.Reply(ACCESS_DENIED);
- return;
- }
+ source.Reply(ACCESS_DENIED);
+ return;
}
NickCore *nc;