diff options
author | Adam <Adam@anope.org> | 2011-08-09 01:55:34 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-08-09 01:55:34 -0400 |
commit | 776583a665fdc1b98b66266f6649865d27337a28 (patch) | |
tree | be07b292c7d307285b5afd78c5e816df8e2a71c5 /modules/commands/bs_assign.cpp | |
parent | 91c3363c1578d24e70d0ed215d6aedc769076f08 (diff) |
Simiplied a bit of the access system
Diffstat (limited to 'modules/commands/bs_assign.cpp')
-rw-r--r-- | modules/commands/bs_assign.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/commands/bs_assign.cpp b/modules/commands/bs_assign.cpp index 803368994..5f0cdc21f 100644 --- a/modules/commands/bs_assign.cpp +++ b/modules/commands/bs_assign.cpp @@ -49,7 +49,7 @@ class CommandBSAssign : public Command return; } - if (ci->botflags.HasFlag(BS_NOBOT) || (!ci->HasPriv(u, CA_ASSIGN) && !u->HasPriv("botserv/administration"))) + if (ci->botflags.HasFlag(BS_NOBOT) || (!ci->AccessFor(u).HasPriv(CA_ASSIGN) && !u->HasPriv("botserv/administration"))) { source.Reply(ACCESS_DENIED); return; @@ -67,7 +67,7 @@ class CommandBSAssign : public Command return; } - bool override = !ci->HasPriv(u, CA_ASSIGN); + bool override = !ci->AccessFor(u).HasPriv(CA_ASSIGN); Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "for " << bi->nick; bi->Assign(u, ci); @@ -111,7 +111,7 @@ class CommandBSUnassign : public Command return; } - if (!u->HasPriv("botserv/administration") && !ci->HasPriv(u, CA_ASSIGN)) + if (!u->HasPriv("botserv/administration") && !ci->AccessFor(u).HasPriv(CA_ASSIGN)) { source.Reply(ACCESS_DENIED); return; @@ -129,7 +129,7 @@ class CommandBSUnassign : public Command return; } - bool override = !ci->HasPriv(u, CA_ASSIGN); + bool override = !ci->AccessFor(u).HasPriv(CA_ASSIGN); Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "for " << ci->bi->nick; ci->bi->UnAssign(u, ci); |