diff options
| author | 2022-04-16 09:38:34 +0100 | |
|---|---|---|
| committer | 2022-04-16 09:38:34 +0100 | |
| commit | 8656e9cce15a5c0c4631ec331b2bd7bc54e952f6 (patch) | |
| tree | 21f1ec4bde985e79f6692327a6dba2b8bd25120c /include | |
| parent | Make the parameter field of ValidateParam const. (diff) | |
Replace duplicated documentation with @copydoc.
Diffstat (limited to 'include')
| -rw-r--r-- | include/listmode.h | 35 | ||||
| -rw-r--r-- | include/mode.h | 29 | ||||
| -rw-r--r-- | include/parammode.h | 1 |
3 files changed, 12 insertions, 53 deletions
diff --git a/include/listmode.h b/include/listmode.h index a6aeef8a6..ff28c2196 100644 --- a/include/listmode.h +++ b/include/listmode.h @@ -137,37 +137,20 @@ public: */ ModeList* GetList(Channel* channel); - /** Display the list for this mode - * See mode.h - * @param user The user to send the list to - * @param channel The channel the user is requesting the list for - */ + /** @copydoc ModeHandler::DisplayList */ void DisplayList(User* user, Channel* channel) override; - /** Tell a user that a list contains no elements. - * Sends 'eolnum' numeric with text 'eolstr', unless overridden (see constructor) - * @param user The user issuing the command - * @param channel The channel that has the empty list - * See mode.h - */ + /** @copydoc ModeHandler::DisplayEmptyList */ void DisplayEmptyList(User* user, Channel* channel) override; - /** Remove all instances of the mode from a channel. - * Populates the given modestack with modes that remove every instance of - * this mode from the channel. - * See mode.h for more details. - * @param channel The channel to remove all instances of the mode from - * @param changelist Mode change list to populate with the removal of this mode - */ + /** @copydoc ModeHandler::RemoveMode */ void RemoveMode(Channel* channel, Modes::ChangeList& changelist) override; /** Perform a rehash of this mode's configuration data */ void DoRehash(); - /** Handle the list mode. - * See mode.h - */ + /** @copydoc ModeHandler::OnModeChange */ ModeAction OnModeChange(User* source, User*, Channel* channel, Modes::Change& change) override; /** Validate parameters. @@ -179,14 +162,8 @@ public: */ virtual bool ValidateParam(User* user, Channel* channel, const std::string& parameter); - /** In the event that the mode should be given a parameter, and no parameter was provided, this method is called. - * This allows you to give special information to the user, or handle this any way you like. - * @param user The user issuing the mode change - * @param dest For user mode changes, the target of the mode. For channel mode changes, NULL. - * @param channel For channel mode changes, the target of the mode. For user mode changes, NULL. - * See mode.h - */ - virtual void OnParameterMissing(User* user, User* dest, Channel* channel) override; + /** @copydoc ModeHandler::OnParameterMissing */ + void OnParameterMissing(User* user, User* dest, Channel* channel) override; /** Tell the user the list is too long. * Overridden by implementing module. diff --git a/include/mode.h b/include/mode.h index bbf7691a0..81ea765e6 100644 --- a/include/mode.h +++ b/include/mode.h @@ -387,27 +387,10 @@ public: */ PrefixMode(Module* Creator, const std::string& Name, char ModeLetter, unsigned int Rank = 0, char PrefixChar = 0); - /** - * Called when a channel mode change access check for your mode occurs. - * @param source Contains the user setting the mode. - * @param channel contains the destination channel the modes are being set on. - * @param change Information regarding the mode change. - * @return allow, deny, or passthru to check against the required level - */ + /** @copydoc ModeHandler::AccessCheck */ ModResult AccessCheck(User* source, Channel* channel, Modes::Change& change) override; - /** - * Handles setting and unsetting the prefix mode. - * Finds the given member of the given channel, if it's not found an error message is sent to 'source' - * and MODEACTION_DENY is returned. Otherwise the mode change is attempted. - * @param source Source of the mode change, an error message is sent to this user if the target is not found - * @param dest Unused - * @param channel The channel the mode change is happening on - * @param change Information regarding the mode change. - * @return MODEACTION_ALLOW if the change happened, MODEACTION_DENY if no change happened - * The latter occurs either when the member cannot be found or when the member already has this prefix set - * (when setting) or doesn't have this prefix set (when unsetting). - */ + /** @copydoc ModeHandler::OnModeChange */ ModeAction OnModeChange(User* source, User* dest, Channel* channel, Modes::Change& change) override; /** @@ -419,11 +402,7 @@ public: */ void Update(unsigned int rank, unsigned int setrank, unsigned int unsetrank, bool selfrm); - /** - * Removes this prefix mode from all users on the given channel - * @param channel The channel which the server wants to remove your mode from - * @param changelist Mode change list to populate with the removal of this mode - */ + /** @copydoc ModeHandler::RemoveMode */ void RemoveMode(Channel* channel, Modes::ChangeList& changelist) override; /** @@ -463,6 +442,7 @@ public: oper = operonly; } + /** @copydoc ModeHandler::OnModeChange */ ModeAction OnModeChange(User* source, User* dest, Channel* channel, Modes::Change& change) override; }; @@ -482,6 +462,7 @@ public: oper = operonly; } + /** @copydoc ModeHandler::OnModeChange */ ModeAction OnModeChange(User* source, User* dest, Channel* channel, Modes::Change& change) override; }; diff --git a/include/parammode.h b/include/parammode.h index 442278ddc..2f4986a9f 100644 --- a/include/parammode.h +++ b/include/parammode.h @@ -30,6 +30,7 @@ public: ParamModeBase(Module* Creator, const std::string& Name, char modeletter, ParamSpec ps) : ModeHandler(Creator, Name, modeletter, ps, MODETYPE_CHANNEL, MC_PARAM) { } + /** @copydoc ModeHandler::OnModeChange */ ModeAction OnModeChange(User* source, User* dest, Channel* channel, Modes::Change& change) override; // Does nothing by default |
