diff options
author | Peter Powell <petpow@saberuk.com> | 2019-06-12 21:46:07 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2019-06-12 21:52:58 +0100 |
commit | 9433e34b2133d8f1e77fea15447ba4d0259a5fb0 (patch) | |
tree | 8e6bb357472f2e39c31c82053a1d02d4b1f7460d /src/modules/m_anticaps.cpp | |
parent | 938837af9fe92d0fef811db96a5e9d6bf8e3ae11 (diff) |
Show the mode syntax in ERR_INVALIDMODEPARAM.
Diffstat (limited to 'src/modules/m_anticaps.cpp')
-rw-r--r-- | src/modules/m_anticaps.cpp | 3 |
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; } |