diff options
| author | 2022-10-29 13:01:42 +0100 | |
|---|---|---|
| committer | 2022-10-29 13:01:42 +0100 | |
| commit | a46b8b8edea0caf94350895acd02f0c90a1027de (patch) | |
| tree | 378d05f11c9c3ea1e814e3b1d88f8a620bea4a9d /src/modules/m_remove.cpp | |
| parent | More const correctness. (diff) | |
Allow UserManager::Find{Nick,UUID,} to ignore unregistered users.
Diffstat (limited to 'src/modules/m_remove.cpp')
| -rw-r--r-- | src/modules/m_remove.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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; |
