summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-02-14 19:32:48 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-02-14 19:32:48 +0000
commit60aefe2290a8fd48a3d03985b3ba456b83019734 (patch)
tree7bf5584d75c943c2806a6598c80422c69f231014 /src
parente088bb55fcf00d4cead3f8f9c9ff15fa5cc846a0 (diff)
Make AC_OTHERMODE OnAccessCheck call work again.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8942 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/mode.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index 063b14fc4..cb9779c94 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -387,6 +387,8 @@ void ModeParser::Process(const char** parameters, int pcnt, User *user, bool ser
}
else if (pcnt > 1)
{
+ bool SkipAccessChecks = false;
+
if (targetchannel)
{
type = MODETYPE_CHANNEL;
@@ -403,6 +405,7 @@ void ModeParser::Process(const char** parameters, int pcnt, User *user, bool ser
FOREACH_RESULT(I_OnAccessCheck,OnAccessCheck(user, NULL, targetchannel, AC_GENERAL_MODE));
if (MOD_RESULT == ACR_DENY)
return;
+ SkipAccessChecks = (MOD_RESULT == ACR_ALLOW);
}
}
else if (targetuser)
@@ -516,7 +519,7 @@ void ModeParser::Process(const char** parameters, int pcnt, User *user, bool ser
if (IS_LOCAL(user) && (MOD_RESULT == ACR_DENY))
continue;
- if (IS_LOCAL(user) && (MOD_RESULT != ACR_ALLOW))
+ if (!SkipAccessChecks && IS_LOCAL(user) && (MOD_RESULT != ACR_ALLOW))
{
ServerInstance->Log(DEBUG,"Enter minimum prefix check");
/* Check access to this mode character */