diff options
-rw-r--r-- | src/helperfuncs.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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()) |