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_watch.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/modules/m_watch.cpp') diff --git a/src/modules/m_watch.cpp b/src/modules/m_watch.cpp index 9f3010ad6..2a1f8f2d6 100644 --- a/src/modules/m_watch.cpp +++ b/src/modules/m_watch.cpp @@ -54,7 +54,7 @@ class CommandWatch final static void SendOnlineOffline(LocalUser* user, const std::string& nick, bool show_offline = true) { - User* target = IRCv3::Monitor::Manager::FindNick(nick); + User* target = ServerInstance->Users.FindNick(nick, true); if (target) { // The away state should only be sent if the client requests away notifications for a nick but 2.0 always sends them so we do that too @@ -92,7 +92,7 @@ class CommandWatch final if (!manager.Unwatch(user, nick)) return; - User* target = IRCv3::Monitor::Manager::FindNick(nick); + User* target = ServerInstance->Users.FindNick(nick, true); if (target) user->WriteNumeric(RPL_WATCHOFF, target->nick, target->ident, target->GetDisplayedHost(), target->nickchanged, "stopped watching"); else -- cgit v1.3.1-10-gc9f91