From 115e6b72fe84b6f5bbbe4dec2f32ac13687e2de4 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 27 Aug 2007 10:45:51 +0000 Subject: When a numeric nick is passed to FindNick, we call FindUUID instead git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7867 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/helperfuncs.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index cb5511ef2..d4fef141b 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -236,6 +236,9 @@ void InspIRCd::WriteMode(const char* modes, int flags, const char* text, ...) /* Find a user record by nickname and return a pointer to it */ userrec* InspIRCd::FindNick(const std::string &nick) { + if (!nick.empty() && isnumeric(*nick.begin())) + return FindUUID(nick); + user_hash::iterator iter = clientlist->find(nick); if (iter == clientlist->end()) @@ -247,6 +250,9 @@ userrec* InspIRCd::FindNick(const std::string &nick) userrec* InspIRCd::FindNick(const char* nick) { + if (isnumeric(*nick)) + return FindUUID(nick); + user_hash::iterator iter = clientlist->find(nick); if (iter == clientlist->end()) -- cgit v1.2.3