summaryrefslogtreecommitdiff
path: root/src/modules/m_anticaps.cpp
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2019-06-12 21:46:07 +0100
committerPeter Powell <petpow@saberuk.com>2019-06-12 21:52:58 +0100
commit9433e34b2133d8f1e77fea15447ba4d0259a5fb0 (patch)
tree8e6bb357472f2e39c31c82053a1d02d4b1f7460d /src/modules/m_anticaps.cpp
parent938837af9fe92d0fef811db96a5e9d6bf8e3ae11 (diff)
Show the mode syntax in ERR_INVALIDMODEPARAM.
Diffstat (limited to 'src/modules/m_anticaps.cpp')
-rw-r--r--src/modules/m_anticaps.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules/m_anticaps.cpp b/src/modules/m_anticaps.cpp
index ef3c750ce..8f020ed03 100644
--- a/src/modules/m_anticaps.cpp
+++ b/src/modules/m_anticaps.cpp
@@ -101,6 +101,7 @@ class AntiCapsMode : public ParamMode<AntiCapsMode, SimpleExtItem<AntiCapsSettin
AntiCapsMode(Module* Creator)
: ParamMode<AntiCapsMode, SimpleExtItem<AntiCapsSettings> >(Creator, "anticaps", 'B')
{
+ syntax = "{ban|block|mute|kick|kickban}:<minlen>:<percent>";
}
ModeAction OnSet(User* source, Channel* channel, std::string& parameter) CXX11_OVERRIDE
@@ -113,7 +114,7 @@ class AntiCapsMode : public ParamMode<AntiCapsMode, SimpleExtItem<AntiCapsSettin
// Attempt to parse the method.
if (!ParseMethod(stream, method) || !ParseMinimumLength(stream, minlen) || !ParsePercent(stream, percent))
{
- source->WriteNumeric(Numerics::InvalidModeParameter(channel, this, parameter, "Invalid anticaps mode parameter. Syntax: <ban|block|mute|kick|kickban>:{minlen}:{percent}."));
+ source->WriteNumeric(Numerics::InvalidModeParameter(channel, this, parameter));
return MODEACTION_DENY;
}