diff options
author | Adam <Adam@anope.org> | 2011-08-01 22:37:27 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-08-01 22:37:27 -0400 |
commit | f7adc0b35b50f06706872a161f1c7476e6e6981e (patch) | |
tree | 91fbe281f2772136a327fd4fc4c64740d1ab65ab /modules/core/cs_set_restricted.cpp | |
parent | 710c02f3bd3581b7c5b3d48e7604756975219fc8 (diff) |
Rewrote the access systems and added a flags access system
Diffstat (limited to 'modules/core/cs_set_restricted.cpp')
-rw-r--r-- | modules/core/cs_set_restricted.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/modules/core/cs_set_restricted.cpp b/modules/core/cs_set_restricted.cpp index 4178af110..9796c97da 100644 --- a/modules/core/cs_set_restricted.cpp +++ b/modules/core/cs_set_restricted.cpp @@ -31,7 +31,7 @@ class CommandCSSetRestricted : public Command return; } - if (!this->permission.empty() && !check_access(u, ci, CA_SET)) + if (!this->permission.empty() && !ci->HasPriv(u, CA_SET)) { source.Reply(ACCESS_DENIED); return; @@ -40,15 +40,11 @@ class CommandCSSetRestricted : public Command if (params[1].equals_ci("ON")) { ci->SetFlag(CI_RESTRICTED); - if (ci->levels[CA_NOJOIN] < 0) - ci->levels[CA_NOJOIN] = 0; source.Reply(_("Restricted access option for %s is now \002on\002."), ci->name.c_str()); } else if (params[1].equals_ci("OFF")) { ci->UnsetFlag(CI_RESTRICTED); - if (ci->levels[CA_NOJOIN] >= 0) - ci->levels[CA_NOJOIN] = -2; source.Reply(_("Restricted access option for %s is now \002off\002."), ci->name.c_str()); } else |