summaryrefslogtreecommitdiff
path: root/src/modules/m_clones.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_clones.cpp')
-rw-r--r--src/modules/m_clones.cpp26
1 files changed, 6 insertions, 20 deletions
diff --git a/src/modules/m_clones.cpp b/src/modules/m_clones.cpp
index 92b1bda78..c51c8d3b4 100644
--- a/src/modules/m_clones.cpp
+++ b/src/modules/m_clones.cpp
@@ -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");
@@ -63,31 +62,18 @@ class CommandClones : public Command
}
};
-
class ModuleClones : public Module
{
- private:
CommandClones cmd;
public:
ModuleClones() : cmd(this)
{
}
- void init()
- {
- ServerInstance->Modules->AddService(cmd);
- }
-
- virtual ~ModuleClones()
- {
- }
-
- virtual Version GetVersion()
+ Version GetVersion() CXX11_OVERRIDE
{
return Version("Provides the /CLONES command to retrieve information on clones.", VF_VENDOR);
}
-
-
};
MODULE_INIT(ModuleClones)