From e827ec50d89e296ea6b19807631b56ed80e869a7 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Thu, 3 Jul 2014 12:32:21 +0200 Subject: Get rid of irc::strings (assign()) in User::ChangeNick() --- 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 b52ca9aa3..abe0f8804 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -619,7 +619,8 @@ bool User::ChangeNick(const std::string& newnick, time_t newts) return false; } - if (assign(newnick) == assign(nick)) + User* const InUse = ServerInstance->FindNickOnly(newnick); + if (InUse == this) { // case change, don't need to check campers // and, if it's identical including case, we can leave right now @@ -638,8 +639,7 @@ bool User::ChangeNick(const std::string& newnick, time_t newts) * If the guy using the nick is already using it, tell the incoming nick change to gtfo, * because the nick is already (rightfully) in use. -- w00t */ - User* InUse = ServerInstance->FindNickOnly(newnick); - if (InUse && (InUse != this)) + if (InUse) { if (InUse->registered != REG_ALL) { -- cgit v1.2.3