From 04e097e20747f07cd69722535fa68a6506882d9f Mon Sep 17 00:00:00 2001 From: danieldg Date: Thu, 15 Oct 2009 04:12:21 +0000 Subject: Add m_namedmodes that adds pseudo-listmode Z that shows and manipulates modes via their long names git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11876 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/mode.cpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'src/mode.cpp') 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& 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& parameters, User *user, return; } + std::string mode_sequence = parameters[1]; + std::string output_mode; std::ostringstream output_parameters; LastParseParams.push_back(output_mode); -- cgit v1.2.3