From 7665af27cd8317bd4fc017d78e3d1b89d6b0a823 Mon Sep 17 00:00:00 2001 From: Adam- Date: Tue, 29 Dec 2009 23:16:10 +0000 Subject: 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 --- include/modules.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include') 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 -- cgit