From 5a508c19ff3dec65bb4148883d38127d7c0be79e Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 29 Oct 2022 13:30:39 +0100 Subject: Use User::IsFullyConnected instead of checking for REG_ALL. --- src/users.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/users.cpp') diff --git a/src/users.cpp b/src/users.cpp index f2a51a8f6..e5b38349d 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -626,7 +626,7 @@ bool User::ChangeNick(const std::string& newnick, time_t newts) */ if (InUse) { - if (InUse->registered != REG_ALL) + if (!InUse->IsFullyConnected()) { /* force the camper to their UUID, and ask them to re-send a NICK. */ LocalUser* const localuser = static_cast(InUse); @@ -643,7 +643,7 @@ bool User::ChangeNick(const std::string& newnick, time_t newts) nickchanged = newts ? newts : ServerInstance->Time(); } - if (this->registered == REG_ALL) + if (IsFullyConnected()) { ClientProtocol::Messages::Nick nickmsg(this, newnick); ClientProtocol::Event nickevent(ServerInstance->GetRFCEvents().nick, nickmsg); @@ -656,7 +656,7 @@ bool User::ChangeNick(const std::string& newnick, time_t newts) ServerInstance->Users.clientlist.erase(oldnick); ServerInstance->Users.clientlist[newnick] = this; - if (registered == REG_ALL) + if (IsFullyConnected()) FOREACH_MOD(OnUserPostNick, (this,oldnick)); return true; -- cgit v1.3.1-10-gc9f91