From 6eae25cd36a95adff860ebc6b109676a7f3bcd5c Mon Sep 17 00:00:00 2001 From: danieldg Date: Sun, 13 Sep 2009 20:33:56 +0000 Subject: 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 --- include/mode.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'include/mode.h') diff --git a/include/mode.h b/include/mode.h index db115a3c9..c0cb5b0fc 100644 --- a/include/mode.h +++ b/include/mode.h @@ -230,6 +230,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 ¶meter, bool adding); + /** * Called when a mode change for your mode occurs. * @param source Contains the user setting the mode. @@ -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; } }; -- cgit v1.2.3