diff options
| author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-11-19 01:53:03 +0000 |
|---|---|---|
| committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-11-19 01:53:03 +0000 |
| commit | e514a3793d251409428caf53cbb75f0be90a6f38 (patch) | |
| tree | 349c4cfc9fc45735999fd81d39a515560ab0e083 /include/modules.h | |
| parent | 68381e69d94735010df986b22c8e758981b50995 (diff) | |
Changed the mode param handling code to be more into the general mode handling code, this cleans up and fixes some small problems with mlocking params. This also helps clarify that the ChannelInfo mode functions are for mlock only. Also, this adds the OnMLock and OnUnMLock events which can be used to control if something can be (un)mlocked
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2660 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'include/modules.h')
| -rw-r--r-- | include/modules.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/modules.h b/include/modules.h index cfa639d08..df917581d 100644 --- a/include/modules.h +++ b/include/modules.h @@ -967,6 +967,20 @@ class CoreExport Module */ virtual void OnUserModeAdd(UserMode *um) { } + /** Called when a mode is about to be mlocked + * @param Name The mode being mlocked + * @param status true if its being mlocked +, false for - + * @param param The param, if there is one and if status is true + * @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to deny the mlock. + */ + virtual EventReturn OnMLock(ChannelModeName Name, bool status, const std::string ¶m) { return EVENT_CONTINUE; } + + /** Called when a mode is about to be unlocked + * @param Name The mode being mlocked + * @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to deny the mlock. + */ + virtual EventReturn OnUnMLock(ChannelModeName Name) { return EVENT_CONTINUE; } + }; @@ -1009,6 +1023,7 @@ enum Implementation I_OnServerQuit, I_OnTopicUpdated, I_OnEncrypt, I_OnEncryptInPlace, I_OnEncryptCheckLen, I_OnDecrypt, I_OnCheckPassword, I_OnChannelModeSet, I_OnChannelModeUnset, I_OnUserModeSet, I_OnUserModeUnset, I_OnChannelModeAdd, I_OnUserModeAdd, + I_OnMLock, I_OnUnMLock, I_END }; |
