aboutsummaryrefslogtreecommitdiff
path: root/src/channels.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2024-08-31 16:21:09 +0100
committerGravatar Sadie Powell2024-08-31 16:21:09 +0100
commitf6da60b3f4e4bd05671cc3ad03200458a426b8e9 (patch)
tree166ce25ba4204d8702206b1129d68b542b62476b /src/channels.cpp
parentMinor performance improvement to ProcessColors. (diff)
Normalise the case of MOD_RESULT variables.
Diffstat (limited to 'src/channels.cpp')
-rw-r--r--src/channels.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index 06251cc78..ec88cf244 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -184,9 +184,9 @@ Membership* Channel::JoinUser(LocalUser* user, std::string cname, bool override,
privs = ServerInstance->Config->DefaultModes.substr(0, ServerInstance->Config->DefaultModes.find(' '));
// Ask the modules whether they're ok with the join, pass NULL as Channel* as the channel is yet to be created
- ModResult MOD_RESULT;
- FIRST_MOD_RESULT(OnUserPreJoin, MOD_RESULT, (user, nullptr, cname, privs, key, override));
- if (!override && MOD_RESULT == MOD_RES_DENY)
+ ModResult modres;
+ FIRST_MOD_RESULT(OnUserPreJoin, modres, (user, nullptr, cname, privs, key, override));
+ if (!override && modres == MOD_RES_DENY)
return nullptr; // A module wasn't happy with the join, abort
chan = new Channel(cname, ServerInstance->Time());
@@ -199,12 +199,12 @@ Membership* Channel::JoinUser(LocalUser* user, std::string cname, bool override,
if (chan->HasUser(user))
return nullptr;
- ModResult MOD_RESULT;
- FIRST_MOD_RESULT(OnUserPreJoin, MOD_RESULT, (user, chan, cname, privs, key, override));
+ ModResult modres;
+ FIRST_MOD_RESULT(OnUserPreJoin, modres, (user, chan, cname, privs, key, override));
// A module explicitly denied the join and (hopefully) generated a message
// describing the situation, so we may stop here without sending anything
- if (!override && MOD_RESULT == MOD_RES_DENY)
+ if (!override && modres == MOD_RES_DENY)
return nullptr;
}