diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-01-06 21:25:38 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-01-06 21:25:38 +0000 |
commit | 38cc4dda4df259bac5a3602be6861cf22e4171e9 (patch) | |
tree | 24ce737873b9da3a8bc82c13c86b4e7bdacd9682 /src/mode.cpp | |
parent | 413074b77152edce980daa0e1dfecc42e15ada33 (diff) |
Hopefully correct implementation of OnRawMode.. can someone pls check this for me tomorrow.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8654 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/mode.cpp')
-rw-r--r-- | src/mode.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mode.cpp b/src/mode.cpp index 3406393cf..e3929e392 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -306,6 +306,11 @@ void ModeParser::Process(const char** parameters, int pcnt, User *user, bool ser { unsigned char mletter = *mode; + int MOD_RESULT = 0; + FOREACH_RESULT(I_OnRawMode, OnRawMode(user, targetchannel, *mode, "", true, 0)); + if (MOD_RESULT == ACR_DENY) + continue; + if (*mode == '+') { mode++; @@ -501,6 +506,11 @@ void ModeParser::Process(const char** parameters, int pcnt, User *user, bool ser continue; } + int MOD_RESULT = 0; + FOREACH_RESULT(I_OnRawMode, OnRawMode(user, targetchannel, modechar, parameter, adding, 1)); + if (MOD_RESULT == ACR_DENY) + return; + bool had_parameter = !parameter.empty(); for (ModeWatchIter watchers = modewatchers[handler_id].begin(); watchers != modewatchers[handler_id].end(); watchers++) @@ -523,6 +533,11 @@ void ModeParser::Process(const char** parameters, int pcnt, User *user, bool ser } else { + int MOD_RESULT = 0; + FOREACH_RESULT(I_OnRawMode, OnRawMode(user, targetchannel, modechar, "", adding, 0)); + if (MOD_RESULT == ACR_DENY) + return; + /* Fix by brain: mode watchers not being called for parameterless modes */ for (ModeWatchIter watchers = modewatchers[handler_id].begin(); watchers != modewatchers[handler_id].end(); watchers++) { |