summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/users.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/users.cpp b/src/users.cpp
index 3c2043ac1..b52ca9aa3 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -647,12 +647,8 @@ bool User::ChangeNick(const std::string& newnick, time_t newts)
InUse->WriteFrom(InUse, "NICK %s", InUse->uuid.c_str());
InUse->WriteNumeric(ERR_NICKNAMEINUSE, "%s :Nickname overruled.", InUse->nick.c_str());
- ServerInstance->Users->clientlist.erase(InUse->nick);
- ServerInstance->Users->clientlist[InUse->uuid] = InUse;
-
- InUse->nick = InUse->uuid;
- InUse->InvalidateCache();
InUse->registered &= ~REG_NICK;
+ InUse->ChangeNick(InUse->uuid);
}
else
{