diff options
| author | 2022-10-29 13:30:39 +0100 | |
|---|---|---|
| committer | 2022-10-29 13:43:11 +0100 | |
| commit | 5a508c19ff3dec65bb4148883d38127d7c0be79e (patch) | |
| tree | 2bdfcbadfdfbe0a6fd244260a9570be86a3eb8d4 /src/users.cpp | |
| parent | Allow UserManager::Find{Nick,UUID,} to ignore unregistered users. (diff) | |
Use User::IsFullyConnected instead of checking for REG_ALL.
Diffstat (limited to 'src/users.cpp')
| -rw-r--r-- | src/users.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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<LocalUser*>(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; |
