summaryrefslogtreecommitdiff
path: root/modules/commands/cs_set_misc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/commands/cs_set_misc.cpp')
-rw-r--r--modules/commands/cs_set_misc.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/modules/commands/cs_set_misc.cpp b/modules/commands/cs_set_misc.cpp
index fd73d8f90..37a8dda4e 100644
--- a/modules/commands/cs_set_misc.cpp
+++ b/modules/commands/cs_set_misc.cpp
@@ -15,9 +15,9 @@
class CommandCSSetMisc : public Command
{
public:
- CommandCSSetMisc(Module *creator, const Anope::string &cname = "chanserv/set/misc") : Command(creator, cname, 1, 2)
+ CommandCSSetMisc(Module *creator, const Anope::string &cname = "chanserv/set/misc") : Command(creator, cname, 1, 1)
{
- this->SetSyntax(_("\037channel\037 \037parameters\037"));
+ this->SetSyntax(_("\037channel\037 [\037parameters\037]"));
}
void Execute(CommandSource &source, const std::vector<Anope::string> &params)
@@ -28,6 +28,11 @@ class CommandCSSetMisc : public Command
source.Reply(CHAN_X_NOT_REGISTERED, params[0].c_str());
return;
}
+ else if (source.permission.empty() && !ci->AccessFor(source.u).HasPriv(CA_SET))
+ {
+ source.Reply(ACCESS_DENIED);
+ return;
+ }
ci->Shrink("cs_set_misc:" + source.command.replace_all_cs(" ", "_"));
if (params.size() > 1)