diff options
| author | 2022-10-07 20:03:05 +0100 | |
|---|---|---|
| committer | 2022-10-07 20:03:05 +0100 | |
| commit | 1cdf4a5ca148449c421c005bdd962756b6b8a12c (patch) | |
| tree | 766186b7b7b6ebc7d88c6a31db68d11961ad000b /include | |
| parent | Fix the indentation of various modules. (diff) | |
Rename user_hash to UserMap and move to usermanager.
Diffstat (limited to 'include')
| -rw-r--r-- | include/channelmanager.h | 1 | ||||
| -rw-r--r-- | include/typedefs.h | 2 | ||||
| -rw-r--r-- | include/usermanager.h | 9 |
3 files changed, 7 insertions, 5 deletions
diff --git a/include/channelmanager.h b/include/channelmanager.h index 48d395770..69acf5a7a 100644 --- a/include/channelmanager.h +++ b/include/channelmanager.h @@ -19,6 +19,7 @@ #pragma once +/** A mapping of channel names to their Channel object. */ typedef std::unordered_map<std::string, Channel*, irc::insensitive, irc::StrHashComp> ChannelMap; /** Manages state relating to channels. */ diff --git a/include/typedefs.h b/include/typedefs.h index 80fc43c7d..c98b39897 100644 --- a/include/typedefs.h +++ b/include/typedefs.h @@ -83,8 +83,6 @@ namespace ClientProtocol #include "hashcomp.h" #include "base.h" -typedef std::unordered_map<std::string, User*, irc::insensitive, irc::StrHashComp> user_hash; - /** List of channels to consider when building the neighbor list of a user */ typedef std::vector<Membership*> IncludeChanList; diff --git a/include/usermanager.h b/include/usermanager.h index e603ee495..17ebf0def 100644 --- a/include/usermanager.h +++ b/include/usermanager.h @@ -28,6 +28,9 @@ #include <list> +/** A mapping of user nicks or uuids to their User object. */ +typedef std::unordered_map<std::string, User*, irc::insensitive, irc::StrHashComp> UserMap; + class CoreExport UserManager final { public: @@ -81,11 +84,11 @@ public: /** Nickname string -> User* map. Contains all users, including unregistered ones. */ - user_hash clientlist; + UserMap clientlist; /** UUID -> User* map. Contains all users, including unregistered ones. */ - user_hash uuidlist; + UserMap uuidlist; /** Oper list, a vector containing all local and remote opered users */ @@ -177,7 +180,7 @@ public: /** Get a hash map containing all users, keyed by their nickname * @return A hash map mapping nicknames to User pointers */ - user_hash& GetUsers() { return clientlist; } + UserMap& GetUsers() { return clientlist; } /** Get a list containing all local users * @return A const list of local users |
