]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_close.cpp
Merge branch 'master+dns'
[user/henk/code/inspircd.git] / src / modules / m_close.cpp
index a5e61e19f9e0071220ccb06e5ee309ff3264a1c3..f3c751f177558f9df8af90a690657206c7745629 100644 (file)
@@ -20,8 +20,6 @@
 
 #include "inspircd.h"
 
-/* $ModDesc: Provides /CLOSE functionality */
-
 /** Handle /CLOSE
  */
 class CommandClose : public Command
@@ -30,13 +28,15 @@ class CommandClose : public Command
        /* Command 'close', needs operator */
        CommandClose(Module* Creator) : Command(Creator,"CLOSE", 0)
        {
-       flags_needed = 'o'; }
+               flags_needed = 'o';
+       }
 
        CmdResult Handle (const std::vector<std::string> &parameters, User *src)
        {
                std::map<std::string,int> closed;
 
-               for (LocalUserList::const_iterator u = ServerInstance->Users->local_users.begin(); u != ServerInstance->Users->local_users.end(); ++u)
+               const UserManager::LocalList& list = ServerInstance->Users.GetLocalUsers();
+               for (UserManager::LocalList::const_iterator u = list.begin(); u != list.end(); ++u)
                {
                        LocalUser* user = *u;
                        if (user->registered != REG_ALL)
@@ -72,11 +72,6 @@ class ModuleClose : public Module
        {
        }
 
-       void init() CXX11_OVERRIDE
-       {
-               ServerInstance->Modules->AddService(cmd);
-       }
-
        Version GetVersion() CXX11_OVERRIDE
        {
                return Version("Provides /CLOSE functionality", VF_VENDOR);