diff options
Diffstat (limited to 'src/mode.cpp')
-rw-r--r-- | src/mode.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/mode.cpp b/src/mode.cpp index 1ac2b9e64..98b5fe8c4 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -392,22 +392,15 @@ void ModeParser::Process(const std::vector<std::string>& parameters, User *user, return; } - std::string mode_sequence = parameters[1]; + ModResult MOD_RESULT; + FIRST_MOD_RESULT(OnPreMode, MOD_RESULT, (user, targetuser, targetchannel, parameters)); bool SkipAccessChecks = false; - if (!IS_LOCAL(user) || ServerInstance->ULine(user->server)) - { + if (!IS_LOCAL(user) || ServerInstance->ULine(user->server) || MOD_RESULT == MOD_RES_ALLOW) SkipAccessChecks = true; - } - else - { - ModResult MOD_RESULT; - FIRST_MOD_RESULT(OnPreMode, MOD_RESULT, (user, targetuser, targetchannel, parameters)); - if (MOD_RESULT == MOD_RES_DENY) - return; - SkipAccessChecks = (MOD_RESULT == MOD_RES_ALLOW); - } + else if (MOD_RESULT == MOD_RES_DENY) + return; if (targetuser && !SkipAccessChecks && user != targetuser) { @@ -415,6 +408,8 @@ void ModeParser::Process(const std::vector<std::string>& parameters, User *user, return; } + std::string mode_sequence = parameters[1]; + std::string output_mode; std::ostringstream output_parameters; LastParseParams.push_back(output_mode); |