]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_close.cpp
Socket engine tweaks to fix a glitch, and improvements to new m_ident
[user/henk/code/inspircd.git] / src / modules / m_close.cpp
index 93328a5a95814dbbfefd9588f428721cbc0173c6..4b91ca789636069422ed9e9f0eb9d1e079cd1a01 100644 (file)
  */
 
 #include "inspircd.h"
-#include "users.h"
-#include "channels.h"
-#include "modules.h"
 
 /* $ModDesc: Provides /CLOSE functionality */
 
 /** Handle /CLOSE
  */
-class cmd_close : public command_t
+class cmd_close : public Command
 {
  public:
        /* Command 'close', needs operator */
-       cmd_close (InspIRCd* Instance) : command_t(Instance,"CLOSE", 'o', 0)
+       cmd_close (InspIRCd* Instance) : Command(Instance,"CLOSE", 'o', 0)
        {
                this->source = "m_close.so";
        }
 
-       CmdResult Handle (const char** parameters, int pcnt, userrec *user)
+       CmdResult Handle (const char** parameters, int pcnt, User *user)
        {
                std::map<std::string,int> closed;
 
-               for (std::vector<userrec*>::iterator u = ServerInstance->local_users.begin(); u != ServerInstance->local_users.end(); u++)
+               for (std::vector<User*>::iterator u = ServerInstance->local_users.begin(); u != ServerInstance->local_users.end(); u++)
                {
                        if ((*u)->registered != REG_ALL)
                        {
-                               userrec::QuitUser(ServerInstance, *u, "Closing all unknown connections per request");
+                               User::QuitUser(ServerInstance, *u, "Closing all unknown connections per request");
                                std::string key = ConvToStr((*u)->GetIPString())+"."+ConvToStr((*u)->GetPort());
                                closed[key]++;
                        }