aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/nick.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2022-10-29 13:01:42 +0100
committerGravatar Sadie Powell2022-10-29 13:01:42 +0100
commita46b8b8edea0caf94350895acd02f0c90a1027de (patch)
tree378d05f11c9c3ea1e814e3b1d88f8a620bea4a9d /src/modules/m_spanningtree/nick.cpp
parentMore const correctness. (diff)
Allow UserManager::Find{Nick,UUID,} to ignore unregistered users.
Diffstat (limited to 'src/modules/m_spanningtree/nick.cpp')
-rw-r--r--src/modules/m_spanningtree/nick.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/m_spanningtree/nick.cpp b/src/modules/m_spanningtree/nick.cpp
index 734e81251..4663a5df2 100644
--- a/src/modules/m_spanningtree/nick.cpp
+++ b/src/modules/m_spanningtree/nick.cpp
@@ -37,8 +37,8 @@ CmdResult CommandNick::HandleRemote(::RemoteUser* user, Params& params)
* On nick messages, check that the nick doesn't already exist here.
* If it does, perform collision logic.
*/
- auto x = ServerInstance->Users.FindNick(params[0]);
- if ((x) && (x != user) && (x->registered == REG_ALL))
+ auto x = ServerInstance->Users.FindNick(params[0], true);
+ if (x && x != user)
{
// 'x' is the already existing user using the same nick as params[0]
// 'user' is the user trying to change nick to the in use nick