aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_disable.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2022-10-29 13:30:39 +0100
committerGravatar Sadie Powell2022-10-29 13:43:11 +0100
commit5a508c19ff3dec65bb4148883d38127d7c0be79e (patch)
tree2bdfcbadfdfbe0a6fd244260a9570be86a3eb8d4 /src/modules/m_disable.cpp
parentAllow UserManager::Find{Nick,UUID,} to ignore unregistered users. (diff)
Use User::IsFullyConnected instead of checking for REG_ALL.
Diffstat (limited to 'src/modules/m_disable.cpp')
-rw-r--r--src/modules/m_disable.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/m_disable.cpp b/src/modules/m_disable.cpp
index 57f471d13..c718d0abc 100644
--- a/src/modules/m_disable.cpp
+++ b/src/modules/m_disable.cpp
@@ -142,7 +142,7 @@ public:
ModResult OnPreCommand(std::string& command, CommandBase::Params& parameters, LocalUser* user, bool validated) override
{
// If a command is unvalidated or the source is not registered we do nothing.
- if (!validated || user->registered != REG_ALL)
+ if (!validated || !user->IsFullyConnected())
return MOD_RES_PASSTHRU;
// If the command is not disabled or the user has the servers/use-disabled-commands priv we do nothing.
@@ -170,7 +170,7 @@ public:
ModResult OnRawMode(User* user, Channel* chan, const Modes::Change& change) override
{
// If a mode change is remote or the source is not registered we do nothing.
- if (!IS_LOCAL(user) || user->registered != REG_ALL)
+ if (!IS_LOCAL(user) || !user->IsFullyConnected())
return MOD_RES_PASSTHRU;
// If the mode is not disabled or the user has the servers/use-disabled-modes priv we do nothing.