From 5a508c19ff3dec65bb4148883d38127d7c0be79e Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 29 Oct 2022 13:30:39 +0100 Subject: Use User::IsFullyConnected instead of checking for REG_ALL. --- src/modules/m_disable.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/modules/m_disable.cpp') 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. -- cgit v1.3.1-10-gc9f91