]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/usermanager.h
Remove UserManager::GarbageCollect()
[user/henk/code/inspircd.git] / include / usermanager.h
index 361584cdaa184cd21cf30d8d218b5587d11748af..941569e8c02e7af1813ec95468fd7e924a3d36d8 100644 (file)
@@ -41,7 +41,7 @@ class CoreExport UserManager : public fakederef<UserManager>
 
        /** A list holding local users
        */
-       typedef intrusive_list<LocalUser> LocalList;
+       typedef insp::intrusive_list<LocalUser> LocalList;
 
  private:
        /** Map of IP addresses for clone counting
@@ -56,6 +56,11 @@ class CoreExport UserManager : public fakederef<UserManager>
         */
        LocalList local_users;
 
+       /** Last used already sent id, used when sending messages to neighbors to help determine whether the message has
+        * been sent to a particular user or not. See User::ForEachNeighbor() for more info.
+        */
+       already_sent_t already_sent_id;
+
  public:
        /** Constructor, initializes variables
         */
@@ -83,12 +88,6 @@ class CoreExport UserManager : public fakederef<UserManager>
         */
        unsigned int unregistered_count;
 
-       /**
-        * Reset the already_sent IDs so we don't wrap it around and drop a message
-        * Also removes all expired invites
-     */
-       void GarbageCollect();
-
        /** Perform background user events such as PING checks
         */
        void DoBackgroundUserStuff();
@@ -130,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
@@ -183,4 +186,9 @@ class CoreExport UserManager : public fakederef<UserManager>
         * @param ... The format arguments
         */
        void ServerNoticeAll(const char* text, ...) CUSTOM_PRINTF(2, 3);
+
+       /** Retrieves the next already sent id, guaranteed to be not equal to any user's already_sent field
+        * @return Next already_sent id
+        */
+       already_sent_t NextAlreadySentId();
 };