diff options
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 |