diff options
| author | 2010-08-05 09:10:54 -0400 | |
|---|---|---|
| committer | 2010-08-05 09:10:54 -0400 | |
| commit | 818f9f79047e27979720495dd67df8a6ead9d212 (patch) | |
| tree | f1d44a54d60351c9992407c1c84f28a1e04e4c57 /include | |
| parent | Call OnCheckJoin for override joins so hooks are still run (diff) | |
Allow OnParameterMissing to fill in the missing parameter
Diffstat (limited to 'include')
| -rw-r--r-- | include/mode.h | 3 | ||||
| -rw-r--r-- | include/modes/umode_s.h | 2 | ||||
| -rw-r--r-- | include/modules.h | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/include/mode.h b/include/mode.h index dda729973..0aa61751f 100644 --- a/include/mode.h +++ b/include/mode.h @@ -324,8 +324,9 @@ class CoreExport ModeHandler : public ServiceProvider * @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. + * @param parameter The parameter (initially empty); if you fill this in, the mode change will be accepted */ - virtual void OnParameterMissing(User* user, User* dest, Channel* channel); + virtual void OnParameterMissing(User* user, User* dest, Channel* channel, std::string& parameter); /** * If your mode is a listmode, this method will be called to display an empty list (just the end of list numeric) diff --git a/include/modes/umode_s.h b/include/modes/umode_s.h index 131a9a669..54eced270 100644 --- a/include/modes/umode_s.h +++ b/include/modes/umode_s.h @@ -22,6 +22,6 @@ class ModeUserServerNoticeMask : public ModeHandler public: ModeUserServerNoticeMask(); ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding); - void OnParameterMissing(User* user, User* dest, Channel* channel); + void OnParameterMissing(User* user, User* dest, Channel* channel, std::string& parameter); std::string GetUserParameter(User* user); }; diff --git a/include/modules.h b/include/modules.h index 99b702578..a1f575be4 100644 --- a/include/modules.h +++ b/include/modules.h @@ -104,7 +104,7 @@ struct ModResult { * and numerical comparisons in preprocessor macros if they wish to support * multiple versions of InspIRCd in one file. */ -#define INSPIRCD_VERSION_API 2 +#define INSPIRCD_VERSION_API 3 /** * This #define allows us to call a method in all |
