summaryrefslogtreecommitdiff
path: root/modules/operserv/info.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/operserv/info.cpp')
-rw-r--r--modules/operserv/info.cpp22
1 files changed, 19 insertions, 3 deletions
diff --git a/modules/operserv/info.cpp b/modules/operserv/info.cpp
index f4785ed88..d5131564c 100644
--- a/modules/operserv/info.cpp
+++ b/modules/operserv/info.cpp
@@ -167,7 +167,7 @@ class CommandOSInfo : public Command
{
if (info.empty())
{
- this->OnSyntaxError(source, cmd);
+ this->OnSyntaxError(source, "ADD");
return;
}
@@ -203,7 +203,7 @@ class CommandOSInfo : public Command
{
if (info.empty())
{
- this->OnSyntaxError(source, cmd);
+ this->OnSyntaxError(source, "DEL");
return;
}
@@ -254,7 +254,7 @@ class CommandOSInfo : public Command
}
else
{
- this->OnSyntaxError(source, cmd);
+ this->OnSyntaxError(source);
}
}
@@ -263,6 +263,22 @@ class CommandOSInfo : public Command
source.Reply(_("Add or delete oper information for a given account or channel. This information will show to opers in the respective info command for the account or channel."));
return true;
}
+
+ void OnSyntaxError(CommandSource &source, const Anope::string &subcommand = "") override
+ {
+ if (subcommand.equals_ci("ADD"))
+ {
+ SubcommandSyntaxError(source, subcommand, _("\037target\037 \037info\037"));
+ }
+ else if (subcommand.equals_ci("DEL"))
+ {
+ SubcommandSyntaxError(source, subcommand, _("\037target\037 \037info\037"));
+ }
+ else
+ {
+ Command::OnSyntaxError(source, subcommand);
+ }
+ }
};
class OSInfo : public Module