summaryrefslogtreecommitdiff
path: root/modules/memoserv/set.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2017-11-19 16:11:35 -0500
committerAdam <Adam@anope.org>2017-11-19 16:11:35 -0500
commit2fda0fff4655e92e388d7823e5b1c1f0c6bcfe2d (patch)
treeb2cde60f3c2c98782690d67d134263924f59cc78 /modules/memoserv/set.cpp
parent3fb9bb5118a5c3c6c916a48feed0e069867f3133 (diff)
Add subcommand syntax help, and reference subcommand help in syntax error messages
Diffstat (limited to 'modules/memoserv/set.cpp')
-rw-r--r--modules/memoserv/set.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/memoserv/set.cpp b/modules/memoserv/set.cpp
index 08a807748..984cc2ef4 100644
--- a/modules/memoserv/set.cpp
+++ b/modules/memoserv/set.cpp
@@ -75,7 +75,7 @@ class CommandMSSet : public Command
}
else
{
- this->OnSyntaxError(source, "");
+ this->OnSyntaxError(source, "NOTIFY");
}
}
@@ -132,7 +132,7 @@ class CommandMSSet : public Command
}
else if (p1.empty() || (!p1.is_pos_number_only() && !p1.equals_ci("NONE")) || (!p2.empty() && !p2.equals_ci("HARD")))
{
- this->OnSyntaxError(source, "");
+ this->OnSyntaxError(source, "LIMIT");
return;
}
if (!chan.empty())
@@ -160,7 +160,7 @@ class CommandMSSet : public Command
{
if (p1.empty() || !p2.empty() || !isdigit(p1[0]))
{
- this->OnSyntaxError(source, "");
+ this->OnSyntaxError(source, "LIMIT");
return;
}
if (!chan.empty() && mi->IsHardMax())
@@ -228,6 +228,7 @@ class CommandMSSet : public Command
const Anope::string &cmd = params[0];
MemoServ::MemoInfo *mi = source.nc->GetMemos();
+#warning "split this into subcommands"
if (Anope::ReadOnly)
source.Reply(_("Sorry, memo option setting is temporarily disabled."));
else if (cmd.equals_ci("NOTIFY"))
@@ -235,7 +236,7 @@ class CommandMSSet : public Command
else if (cmd.equals_ci("LIMIT"))
return this->DoLimit(source, params, mi);
else
- this->OnSyntaxError(source, "");
+ this->OnSyntaxError(source);
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override