From ef61e7b19ca6bee05b459088967242ae6950d9c5 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 30 Jan 2020 14:41:25 +0000 Subject: Use the default OnParameterMissing in ModeUserServerNoticeMask. --- src/coremods/core_user/core_user.h | 1 - src/coremods/core_user/umode_s.cpp | 7 +------ 2 files changed, 1 insertion(+), 7 deletions(-) (limited to 'src') diff --git a/src/coremods/core_user/core_user.h b/src/coremods/core_user/core_user.h index b76e97313..8289ad5a8 100644 --- a/src/coremods/core_user/core_user.h +++ b/src/coremods/core_user/core_user.h @@ -217,7 +217,6 @@ class ModeUserServerNoticeMask : public ModeHandler public: ModeUserServerNoticeMask(Module* Creator); ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) CXX11_OVERRIDE; - void OnParameterMissing(User* user, User* dest, Channel* channel) CXX11_OVERRIDE; /** Create a displayable mode string of the snomasks set on a given user * @param user The user whose notice masks to format diff --git a/src/coremods/core_user/umode_s.cpp b/src/coremods/core_user/umode_s.cpp index 74b47755d..2c72ea179 100644 --- a/src/coremods/core_user/umode_s.cpp +++ b/src/coremods/core_user/umode_s.cpp @@ -30,7 +30,7 @@ ModeUserServerNoticeMask::ModeUserServerNoticeMask(Module* Creator) : ModeHandler(Creator, "snomask", 's', PARAM_SETONLY, MODETYPE_USER) { oper = true; - syntax = "(+|-)"; + syntax = "(+|-)|*"; } ModeAction ModeUserServerNoticeMask::OnModeChange(User* source, User* dest, Channel*, std::string ¶meter, bool adding) @@ -71,11 +71,6 @@ std::string ModeUserServerNoticeMask::GetUserParameter(const User* user) const return ret; } -void ModeUserServerNoticeMask::OnParameterMissing(User* user, User* dest, Channel* channel) -{ - user->WriteNotice("*** The user mode +s requires a parameter (server notice mask). Please provide a parameter, e.g. '+s +*'."); -} - std::string ModeUserServerNoticeMask::ProcessNoticeMasks(User* user, const std::string& input) { bool adding = true; -- cgit v1.2.3