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_watch.cpp | |
| parent | More const correctness. (diff) | |
Allow UserManager::Find{Nick,UUID,} to ignore unregistered users.
Diffstat (limited to 'src/modules/m_watch.cpp')
| -rw-r--r-- | src/modules/m_watch.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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 |
