summaryrefslogtreecommitdiff
path: root/src/mode.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-15 04:12:21 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-15 04:12:21 +0000
commit04e097e20747f07cd69722535fa68a6506882d9f (patch)
treeaba533443093f9a945303c0fde97b3c1e3e01ccf /src/mode.cpp
parentdbf4d595433ecefeb61f1267ffa515a91c3ab548 (diff)
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
Diffstat (limited to 'src/mode.cpp')
-rw-r--r--src/mode.cpp19
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);