diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-07-03 12:30:54 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-07-03 12:30:54 +0200 |
commit | 43063e15a27298a89c4f1ca592747fc417fa11b5 (patch) | |
tree | 8d34dc4d57b639e06bb79db54669cf6abca53dab | |
parent | 393cc8f9d65aefd92628115edae341562ea440e7 (diff) |
Deduplicate code in User::ChangeNick()
-rw-r--r-- | src/users.cpp | 6 |
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 { |