From a46b8b8edea0caf94350895acd02f0c90a1027de Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 29 Oct 2022 13:01:42 +0100 Subject: Allow UserManager::Find{Nick,UUID,} to ignore unregistered users. --- src/modules/m_remove.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/modules/m_remove.cpp') diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp index 2b9aaa597..677d5d47e 100644 --- a/src/modules/m_remove.cpp +++ b/src/modules/m_remove.cpp @@ -62,9 +62,9 @@ public: /* Look up the user we're meant to be removing from the channel */ User* target; if (IS_LOCAL(user)) - target = ServerInstance->Users.FindNick(username); + target = ServerInstance->Users.FindNick(username, true); else - target = ServerInstance->Users.Find(username); + target = ServerInstance->Users.Find(username, true); /* And the channel we're meant to be removing them from */ auto channel = ServerInstance->Channels.Find(channame); @@ -75,7 +75,7 @@ public: user->WriteNumeric(Numerics::NoSuchChannel(channame)); return CmdResult::FAILURE; } - if ((!target) || (target->registered != REG_ALL)) + if (!target) { user->WriteNumeric(Numerics::NoSuchNick(username)); return CmdResult::FAILURE; -- cgit v1.3.1-10-gc9f91