aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_operchans.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2021-05-23 01:53:34 +0100
committerGravatar Sadie Powell2021-05-23 01:58:34 +0100
commitee1325cf9ddcb47b2d2c1b79093e0fa5a38b75c7 (patch)
tree8ede088cbb9a89f2f10d194d6c094b84db61fc06 /src/modules/m_operchans.cpp
parentRefactor the population of exceptions in delayjoin. (diff)
Fire OnUserPreJoin regardless of whether the join is an override.
Diffstat (limited to 'src/modules/m_operchans.cpp')
-rw-r--r--src/modules/m_operchans.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/m_operchans.cpp b/src/modules/m_operchans.cpp
index 4f5a0f74c..2b69b2f09 100644
--- a/src/modules/m_operchans.cpp
+++ b/src/modules/m_operchans.cpp
@@ -75,9 +75,9 @@ class ModuleOperChans
{
}
- ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven) override
+ ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven, bool override) override
{
- if (chan && chan->IsModeSet(oc) && !user->IsOper())
+ if (!override && chan && chan->IsModeSet(oc) && !user->IsOper())
{
user->WriteNumeric(ERR_CANTJOINOPERSONLY, chan->name, InspIRCd::Format("Only server operators may join %s (+O is set)", chan->name.c_str()));
return MOD_RES_DENY;