summaryrefslogtreecommitdiff
path: root/src/mode.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-09 13:46:58 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-09 13:46:58 +0000
commitb612881ec950c1d2c57afe4fdea16d83830890db (patch)
tree4a0f03b075c928a2e3a9aacfa4f630cd413e601a /src/mode.cpp
parentd4ec79a385b05e6ba54ec22457f043307f5a1af9 (diff)
m_override is now fixed, replaced AC_GENERAL_MODE OnAccessCheck event
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5180 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/mode.cpp')
-rw-r--r--src/mode.cpp24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index 3bdcb1a30..290933ab6 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -312,15 +312,23 @@ void ModeParser::Process(const char** parameters, int pcnt, userrec *user, bool
/* We don't have halfop */
ServerInstance->Log(DEBUG,"The user is not a halfop or above, checking other reasons for being able to set the modes");
- /* Are we a uline or is it a servermode? */
- if ((!ServerInstance->ULine(user->server)) && (!servermode))
- {
- /* Not enough permission:
- * NOT a uline and NOT a servermode,
- * OR, NOT halfop or above.
- */
- user->WriteServ("482 %s %s :You're not a channel (half)operator",user->nick, targetchannel->name);
+ int MOD_RESULT = 0;
+ FOREACH_RESULT(I_OnAccessCheck,OnAccessCheck(user, NULL, targetchannel, AC_GENERAL_MODE));
+ if (MOD_RESULT == ACR_DENY)
return;
+
+ if (MOD_RESULT == ACR_DEFAULT)
+ {
+ /* Are we a uline or is it a servermode? */
+ if ((!ServerInstance->ULine(user->server)) && (!servermode))
+ {
+ /* Not enough permission:
+ * NOT a uline and NOT a servermode,
+ * OR, NOT halfop or above.
+ */
+ user->WriteServ("482 %s %s :You're not a channel (half)operator",user->nick, targetchannel->name);
+ return;
+ }
}
}
}