summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-13 20:33:56 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-13 20:33:56 +0000
commit6eae25cd36a95adff860ebc6b109676a7f3bcd5c (patch)
tree370be8a16c59db97cc627a3720391096168af86a /include
parentdd61b852e50a6a79c12214e2a9fb15c4ef2cf42b (diff)
Fix access checks on chanprotect preventing use of SAMODE
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11717 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r--include/mode.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/mode.h b/include/mode.h
index db115a3c9..c0cb5b0fc 100644
--- a/include/mode.h
+++ b/include/mode.h
@@ -231,6 +231,16 @@ class CoreExport ModeHandler : public classbase
virtual std::string GetUserParameter(User* useor);
/**
+ * 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 parameter The parameter for your mode. This is modifiable.
+ * @param adding This value is true when the mode is being set, or false when it is being unset.
+ * @return allow, deny, or passthru to check against the required level
+ */
+ virtual ModResult AccessCheck(User* source, Channel* channel, std::string &parameter, bool adding);
+
+ /**
* Called when a mode change for your mode occurs.
* @param source Contains the user setting the mode.
* @param dest For usermodes, contains the destination user the mode is being set on. For channelmodes, this is an undefined value.
@@ -312,7 +322,7 @@ class CoreExport ModeHandler : public classbase
* @param channel The channel which the server wants to remove your mode from
*/
virtual void RemoveMode(Channel* channel, irc::modestacker* stack = NULL);
-
+
inline unsigned int GetLevelRequired() const { return levelrequired; }
};