diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-08-27 10:45:51 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-08-27 10:45:51 +0000 |
commit | 115e6b72fe84b6f5bbbe4dec2f32ac13687e2de4 (patch) | |
tree | ebdb84f2043ff57a62d77fbd20edba0bb98b32ab | |
parent | 0ad2ac70a2203d5e76450920022bbcf6bc4ae438 (diff) |
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
-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()) |