summaryrefslogtreecommitdiff
path: root/modules/chanserv/akick.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/chanserv/akick.cpp
parent3fb9bb5118a5c3c6c916a48feed0e069867f3133 (diff)
Add subcommand syntax help, and reference subcommand help in syntax error messages
Diffstat (limited to 'modules/chanserv/akick.cpp')
-rw-r--r--modules/chanserv/akick.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/modules/chanserv/akick.cpp b/modules/chanserv/akick.cpp
index bbdd614e5..b099c48ac 100644
--- a/modules/chanserv/akick.cpp
+++ b/modules/chanserv/akick.cpp
@@ -599,7 +599,7 @@ class CommandCSAKick : public Command
else if (cmd.equals_ci("CLEAR"))
this->DoClear(source, ci);
else
- this->OnSyntaxError(source, "");
+ this->OnSyntaxError(source);
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
@@ -678,6 +678,22 @@ class CommandCSAKick : public Command
return true;
}
+
+ void OnSyntaxError(CommandSource &source, const Anope::string &subcommand = "") override
+ {
+ if (subcommand.equals_ci("ADD"))
+ {
+ SubcommandSyntaxError(source, subcommand, _("{\037nick\037 | \037mask\037} [\037reason\037]"));
+ }
+ else if (subcommand.equals_ci("DEL"))
+ {
+ SubcommandSyntaxError(source, subcommand, _("{\037nick\037 | \037mask\037 | \037entry-num\037 | \037list\037}"));
+ }
+ else
+ {
+ Command::OnSyntaxError(source, subcommand);
+ }
+ }
};
class CSAKick : public Module