]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/usermanager.h
Access local user list via new UserManager::GetLocalUsers() and make local_users...
[user/henk/code/inspircd.git] / include / usermanager.h
index a419916f28718f3ad38193e1f68ee0718f695fc2..361584cdaa184cd21cf30d8d218b5587d11748af 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <list>
 
-class CoreExport UserManager
+class CoreExport UserManager : public fakederef<UserManager>
 {
  public:
        struct CloneCounts
@@ -39,6 +39,10 @@ class CoreExport UserManager
         */
        typedef std::vector<User*> OperList;
 
+       /** A list holding local users
+       */
+       typedef intrusive_list<LocalUser> LocalList;
+
  private:
        /** Map of IP addresses for clone counting
         */
@@ -48,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
         */
@@ -66,10 +74,6 @@ 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
         */
        OperList all_opers;
@@ -169,6 +173,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