From 9433e34b2133d8f1e77fea15447ba4d0259a5fb0 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Wed, 12 Jun 2019 21:46:07 +0100 Subject: Show the mode syntax in ERR_INVALIDMODEPARAM. --- src/coremods/core_channel/cmode_k.cpp | 1 + src/coremods/core_channel/cmode_l.cpp | 1 + src/coremods/core_channel/core_channel.h | 1 + src/coremods/core_user/umode_s.cpp | 1 + 4 files changed, 4 insertions(+) (limited to 'src/coremods') diff --git a/src/coremods/core_channel/cmode_k.cpp b/src/coremods/core_channel/cmode_k.cpp index 43f41ddfd..ff8beeaf9 100644 --- a/src/coremods/core_channel/cmode_k.cpp +++ b/src/coremods/core_channel/cmode_k.cpp @@ -28,6 +28,7 @@ const std::string::size_type ModeChannelKey::maxkeylen = 32; ModeChannelKey::ModeChannelKey(Module* Creator) : ParamMode(Creator, "key", 'k', PARAM_ALWAYS) { + syntax = ""; } ModeAction ModeChannelKey::OnModeChange(User* source, User*, Channel* channel, std::string ¶meter, bool adding) diff --git a/src/coremods/core_channel/cmode_l.cpp b/src/coremods/core_channel/cmode_l.cpp index e71eb500e..d3b806956 100644 --- a/src/coremods/core_channel/cmode_l.cpp +++ b/src/coremods/core_channel/cmode_l.cpp @@ -26,6 +26,7 @@ ModeChannelLimit::ModeChannelLimit(Module* Creator) : ParamMode(Creator, "limit", 'l') , minlimit(0) { + syntax = ""; } bool ModeChannelLimit::ResolveModeConflict(std::string &their_param, const std::string &our_param, Channel*) diff --git a/src/coremods/core_channel/core_channel.h b/src/coremods/core_channel/core_channel.h index c054d5265..bfcf59358 100644 --- a/src/coremods/core_channel/core_channel.h +++ b/src/coremods/core_channel/core_channel.h @@ -168,6 +168,7 @@ class ModeChannelBan : public ListModeBase ModeChannelBan(Module* Creator) : ListModeBase(Creator, "ban", 'b', "End of channel ban list", 367, 368, true) { + syntax = ""; } }; diff --git a/src/coremods/core_user/umode_s.cpp b/src/coremods/core_user/umode_s.cpp index 7c83e008b..4c3725ee5 100644 --- a/src/coremods/core_user/umode_s.cpp +++ b/src/coremods/core_user/umode_s.cpp @@ -26,6 +26,7 @@ ModeUserServerNoticeMask::ModeUserServerNoticeMask(Module* Creator) : ModeHandler(Creator, "snomask", 's', PARAM_SETONLY, MODETYPE_USER) { oper = true; + syntax = "(+|-)"; } ModeAction ModeUserServerNoticeMask::OnModeChange(User* source, User* dest, Channel*, std::string ¶meter, bool adding) -- cgit v1.2.3