]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_clones.cpp
m_spanningtree Replace WriteLine() call with Unicast() in DoCollision()
[user/henk/code/inspircd.git] / src / modules / m_clones.cpp
index 830d922320ce6d47b51f2d64f8b36a8a9ceb4a5e..c51c8d3b4f13e7d7427f017d60fb435ac951d557 100644 (file)
@@ -21,8 +21,6 @@
 
 #include "inspircd.h"
 
-/* $ModDesc: Provides the /CLONES command to retrieve information on clones. */
-
 /** Handle /CLONES
  */
 class CommandClones : public Command
@@ -50,11 +48,12 @@ class CommandClones : public Command
                user->WriteServ(clonesstr + " START");
 
                /* hostname or other */
-               // XXX I really don't like marking global_clones public for this. at all. -- w00t
-               for (clonemap::iterator x = ServerInstance->Users->global_clones.begin(); x != ServerInstance->Users->global_clones.end(); x++)
+               const UserManager::CloneMap& clonemap = ServerInstance->Users->GetCloneMap();
+               for (UserManager::CloneMap::const_iterator i = clonemap.begin(); i != clonemap.end(); ++i)
                {
-                       if (x->second >= limit)
-                               user->WriteServ(clonesstr + " "+ ConvToStr(x->second) + " " + x->first.str());
+                       const UserManager::CloneCounts& counts = i->second;
+                       if (counts.global >= limit)
+                               user->WriteServ(clonesstr + " " + ConvToStr(counts.global) + " " + i->first.str());
                }
 
                user->WriteServ(clonesstr + " END");
@@ -71,12 +70,7 @@ class ModuleClones : public Module
        {
        }
 
-       void init()
-       {
-               ServerInstance->Modules->AddService(cmd);
-       }
-
-       virtual Version GetVersion()
+       Version GetVersion() CXX11_OVERRIDE
        {
                return Version("Provides the /CLONES command to retrieve information on clones.", VF_VENDOR);
        }