X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fusermanager.h;h=a67f90224d628839eda4c05a6f7feac53e08cd11;hb=cd67a0a6f9380d4a54bc92370f2925f2d2a684dc;hp=eb1d75e8d50b188621aa6e2b32889c6299724cc4;hpb=d60103cada2c954f6d735c0ae4fb7d9b1b5ed844;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/usermanager.h b/include/usermanager.h index eb1d75e8d..a67f90224 100644 --- a/include/usermanager.h +++ b/include/usermanager.h @@ -21,7 +21,7 @@ #include -class CoreExport UserManager +class CoreExport UserManager : public fakederef { public: struct CloneCounts @@ -35,6 +35,14 @@ class CoreExport UserManager */ typedef std::map CloneMap; + /** Sequence container in which each element is a User* + */ + typedef std::vector OperList; + + /** A list holding local users + */ + typedef insp::intrusive_list LocalList; + private: /** Map of IP addresses for clone counting */ @@ -44,6 +52,10 @@ class CoreExport UserManager */ const CloneCounts zeroclonecounts; + /** Local client list, a list containing only local clients + */ + LocalList local_users; + public: /** Constructor, initializes variables */ @@ -62,13 +74,9 @@ class CoreExport UserManager */ user_hash uuidlist; - /** Local client list, a list containing only local clients - */ - LocalUserList local_users; - /** Oper list, a vector containing all local and remote opered users */ - std::list all_opers; + OperList all_opers; /** Number of unregistered users online right now. * (Unregistered means before USER/NICK/dns) @@ -122,6 +130,10 @@ class CoreExport UserManager */ void RemoveCloneCounts(User *user); + /** Rebuild clone counts + */ + void RehashCloneCounts(); + /** Return the number of local and global clones of this user * @param user The user to get the clone counts for * @return The clone counts of this user. The returned reference is volatile - you @@ -165,6 +177,11 @@ class CoreExport UserManager */ user_hash& GetUsers() { return clientlist; } + /** Get a list containing all local users + * @return A const list of local users + */ + const LocalList& GetLocalUsers() const { return local_users; } + /** Send a server notice to all local users * @param text The text format string to send * @param ... The format arguments