X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=inline;f=include%2Fusermanager.h;h=2a9d6b47b2b9ca54c893ba75a07bbe296a74f9e9;hb=4c751dbbe8945e5efc230a59b0ed51c2ba10cf92;hp=b549edb1039d9769aaa811303f346db0fd320c9e;hpb=46a39046196f55b52336e19662bb7bac85b731ac;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/usermanager.h b/include/usermanager.h index b549edb10..2a9d6b47b 100644 --- a/include/usermanager.h +++ b/include/usermanager.h @@ -32,6 +32,8 @@ class CoreExport UserManager */ clonemap local_clones; public: + UserManager(); + ~UserManager() { for (user_hash::iterator i = clientlist->begin();i != clientlist->end();i++) @@ -52,9 +54,9 @@ class CoreExport UserManager */ user_hash* uuidlist; - /** Local client list, a vector containing only local clients + /** Local client list, a list containing only local clients */ - std::vector local_users; + LocalUserList local_users; /** Oper list, a vector containing all local and remote opered users */ @@ -63,7 +65,11 @@ class CoreExport UserManager /** Number of unregistered users online right now. * (Unregistered means before USER/NICK/dns) */ - int unregistered_count; + unsigned int unregistered_count; + + /** Number of elements in local_users + */ + unsigned int local_count; /** Map of global ip addresses for clone counting * XXX - this should be private, but m_clones depends on it currently. @@ -73,7 +79,6 @@ class CoreExport UserManager /** Add a client to the system. * This will create a new User, insert it into the user_hash, * initialize it as not yet registered, and add it to the socket engine. - * @param Instance a pointer to the server instance * @param socket The socket id (file descriptor) this user is on * @param via The socket that this user connected using * @param client The IP address and client port of the user @@ -84,8 +89,8 @@ class CoreExport UserManager /** Disconnect a user gracefully * @param user The user to remove - * @param r The quit reason to show to normal users - * @param oreason The quit reason to show to opers + * @param quitreason The quit reason to show to normal users + * @param operreason The quit reason to show to opers * @return Although this function has no return type, on exit the user provided will no longer exist. */ void QuitUser(User *user, const std::string &quitreason, const char* operreason = ""); @@ -107,6 +112,10 @@ class CoreExport UserManager */ void RemoveCloneCounts(User *user); + /** Rebuild clone counts + */ + void RehashCloneCounts(); + /** Return the number of global clones of this user * @param user The user to get a count for * @return The global clone count of this user