]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/usermanager.h
Rewrite invite system
[user/henk/code/inspircd.git] / include / usermanager.h
index 945e644399021c7a0e844d6bd126d93869a5615e..eee076802f866927f11ee1aca287e77140cfdf57 100644 (file)
@@ -39,6 +39,10 @@ class CoreExport UserManager : public fakederef<UserManager>
         */
        typedef std::vector<User*> OperList;
 
+       /** A list holding local users
+       */
+       typedef insp::intrusive_list<LocalUser> LocalList;
+
  private:
        /** Map of IP addresses for clone counting
         */
@@ -48,6 +52,10 @@ class CoreExport UserManager : public fakederef<UserManager>
         */
        const CloneCounts zeroclonecounts;
 
+       /** Local client list, a list containing only local clients
+        */
+       LocalList local_users;
+
  public:
        /** Constructor, initializes variables
         */
@@ -66,10 +74,6 @@ class CoreExport UserManager : public fakederef<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
         */
        OperList all_opers;
@@ -81,7 +85,6 @@ class CoreExport UserManager : public fakederef<UserManager>
 
        /**
         * Reset the already_sent IDs so we don't wrap it around and drop a message
-        * Also removes all expired invites
      */
        void GarbageCollect();
 
@@ -126,6 +129,10 @@ class CoreExport UserManager : public fakederef<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
@@ -169,6 +176,11 @@ class CoreExport UserManager : public fakederef<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