From 306ef5e3ead14db376657419f3b851ac79be083b Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Mon, 7 Dec 2015 10:19:02 +0100 Subject: Deduplicate code in InspIRCd::FindNick() --- src/helperfuncs.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src') diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index d636e2d89..78d272b5f 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -37,14 +37,7 @@ User* InspIRCd::FindNick(const std::string &nick) { if (!nick.empty() && isdigit(*nick.begin())) return FindUUID(nick); - - user_hash::iterator iter = this->Users->clientlist.find(nick); - - if (iter == this->Users->clientlist.end()) - /* Couldn't find it */ - return NULL; - - return iter->second; + return FindNickOnly(nick); } User* InspIRCd::FindNickOnly(const std::string &nick) -- cgit v1.2.3