]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/usermanager.h
As we have an enum for type, why not ..use it?
[user/henk/code/inspircd.git] / include / usermanager.h
index 4c50c4292720251ec47471fcf0a54d5d4bc28bf0..6ec80c9db27ec3df018a822855ac1a57d6af7a47 100644 (file)
@@ -19,7 +19,7 @@
 /** A list of ip addresses cross referenced against clone counts */
 typedef std::map<irc::string, unsigned int> clonemap;
 
-class CoreExport UserManager : public classbase
+class CoreExport UserManager : public Extensible
 {
  private:
        InspIRCd *ServerInstance;
@@ -28,11 +28,18 @@ class CoreExport UserManager : public classbase
         */
        clonemap local_clones;
  public:
-       UserManager(InspIRCd *Instance)
+       UserManager(InspIRCd *Instance) : ServerInstance(Instance)
        {
-               ServerInstance = Instance;
        }
-
+       
+       ~UserManager()
+       {
+               for (user_hash::iterator i = clientlist->begin();i != clientlist->end();i++)
+               {
+                       delete i->second;
+               }
+               clientlist->clear();
+       }
 
        /** Client list, a hash_map containing all clients, local and remote
         */