diff options
| author | 2020-02-09 16:13:04 +0000 | |
|---|---|---|
| committer | 2020-02-09 17:19:31 +0000 | |
| commit | 61070d489478793a6ba2ad0bd2ecc90d14555030 (patch) | |
| tree | 94f196542ccc3c4cd735730b9e666459a82f574a /src/usermanager.cpp | |
| parent | Move FindUUID to the UserManager class. (diff) | |
Move FindNick to UserManager.
Diffstat (limited to 'src/usermanager.cpp')
| -rw-r--r-- | src/usermanager.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/usermanager.cpp b/src/usermanager.cpp index 1004e5748..d597fe038 100644 --- a/src/usermanager.cpp +++ b/src/usermanager.cpp @@ -435,6 +435,17 @@ already_sent_t UserManager::NextAlreadySentId() return already_sent_id; } +User* UserManager::Find(const std::string& nickuuid) +{ + if (nickuuid.empty()) + return nullptr; + + if (isdigit(nickuuid[0])) + return FindUUID(nickuuid); + + return FindNick(nickuuid); +} + User* UserManager::FindUUID(const std::string& uuid) { if (uuid.empty()) |
