summaryrefslogtreecommitdiff
path: root/src/mode.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-02 00:49:36 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-02 00:49:36 +0000
commit86775e2e98f55b3b88befe2daff0ca23f02f3155 (patch)
treecbc3abf3f55ae6fd1112bcf6bf44e02b502ac2d6 /src/mode.cpp
parent3d8ec5dbd9cfde34fcbc63ad7b9b1369866f0a33 (diff)
ModResult conversion: Change return type of all module functions
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11634 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/mode.cpp')
-rw-r--r--src/mode.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index a89227982..38f7835fc 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -350,13 +350,13 @@ ModeAction ModeParser::TryMode(User* user, User* targetuser, Channel* chan, bool
ModeHandler *mh = FindMode(modechar, type);
int pcnt = mh->GetNumParams(adding);
- int MOD_RESULT = 0;
- FOREACH_RESULT(I_OnRawMode, OnRawMode(user, chan, modechar, parameter, adding, pcnt));
+ ModResult MOD_RESULT;
+ FIRST_MOD_RESULT(ServerInstance, OnRawMode, MOD_RESULT, (user, chan, modechar, parameter, adding, pcnt));
- if (IS_LOCAL(user) && (MOD_RESULT == ACR_DENY))
+ if (IS_LOCAL(user) && (MOD_RESULT == MOD_RES_DENY))
return MODEACTION_DENY;
- if (chan && !SkipACL && (MOD_RESULT != ACR_ALLOW))
+ if (chan && !SkipACL && (MOD_RESULT != MOD_RES_ALLOW))
{
char needed = mh->GetNeededPrefix();
ModeHandler* prefixmode = FindPrefix(needed);
@@ -489,12 +489,12 @@ void ModeParser::Process(const std::vector<std::string>& parameters, User *user,
{
/* Overall access control hook for mode change */
LastParse = mode_sequence;
- int MOD_RESULT = 0;
- FOREACH_RESULT(I_OnAccessCheck,OnAccessCheck(user, NULL, targetchannel, AC_GENERAL_MODE));
+ ModResult MOD_RESULT;
+ FIRST_MOD_RESULT(ServerInstance, OnAccessCheck, MOD_RESULT, (user, NULL, targetchannel, AC_GENERAL_MODE));
LastParse.clear();
- if (MOD_RESULT == ACR_DENY)
+ if (MOD_RESULT == MOD_RES_DENY)
return;
- SkipAccessChecks = (MOD_RESULT == ACR_ALLOW);
+ SkipAccessChecks = (MOD_RESULT == MOD_RES_ALLOW);
}
else
{
@@ -636,9 +636,9 @@ void ModeParser::DisplayListModes(User* user, Channel* chan, std::string &mode_s
if (!mh || !mh->IsListMode())
return;
- int MOD_RESULT = 0;
- FOREACH_RESULT(I_OnRawMode, OnRawMode(user, chan, mletter, "", true, 0));
- if (MOD_RESULT == ACR_DENY)
+ ModResult MOD_RESULT;
+ FIRST_MOD_RESULT(ServerInstance, OnRawMode, MOD_RESULT, (user, chan, mletter, "", true, 0));
+ if (MOD_RESULT == MOD_RES_DENY)
continue;
bool display = true;