summaryrefslogtreecommitdiff
path: root/include/modules.h
diff options
context:
space:
mode:
authorAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2009-12-29 23:16:10 +0000
committerAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2009-12-29 23:16:10 +0000
commit7665af27cd8317bd4fc017d78e3d1b89d6b0a823 (patch)
treeea4f8e4bf15dcf91ba0622ff0a8b036b0a91f8ef /include/modules.h
parentdf107dac1f50e721493aaf0657f85cba5ef8b35f (diff)
Chnaged ChannelModeSet/Unset events to be able to block checks such as secureops and mlock, and made it so you can't set a mode already set or unset a mode already unset so the modestacker doesn't send modes it doesn't need to
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2719 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'include/modules.h')
-rw-r--r--include/modules.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/modules.h b/include/modules.h
index df917581d..f4d9700f3 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -936,14 +936,16 @@ class CoreExport Module
/** Called when a mode is set on a channel
* @param c The channel
* @param Name The mode name
+ * @return EVENT_STOP to make mlock/secureops etc checks not happen
*/
- virtual void OnChannelModeSet(Channel *c, ChannelModeName Name) { }
+ virtual EventReturn OnChannelModeSet(Channel *c, ChannelModeName Name) { return EVENT_CONTINUE; }
/** Called when a mode is unset on a channel
* @param c The channel
* @param Name The mode name
+ * @return EVENT_STOP to make mlock/secureops etc checks not happen
*/
- virtual void OnChannelModeUnset(Channel *c, ChannelModeName Name) { }
+ virtual EventReturn OnChannelModeUnset(Channel *c, ChannelModeName Name) { return EVENT_CONTINUE; }
/** Called when a mode is set on a user
* @param u The user