]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_close.cpp
Access local user list via new UserManager::GetLocalUsers() and make local_users...
[user/henk/code/inspircd.git] / src / modules / m_close.cpp
index 806a88640fcae54af7d566b95baa2295629decb8..f3c751f177558f9df8af90a690657206c7745629 100644 (file)
@@ -28,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)
@@ -70,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);