aboutsummaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp6
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;