]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_close.cpp
A little less debug saying WEEEE :]
[user/henk/code/inspircd.git] / src / modules / m_close.cpp
index 4b91ca789636069422ed9e9f0eb9d1e079cd1a01..ebffc68647f04c3e5f9a3e81011f0a7457183b83 100644 (file)
@@ -2,7 +2,7 @@
  *       | UnrealIRCd v4.0                    |
  *       +------------------------------------+
  *
- * UnrealIRCd 4.0 (C) 2007 Carsten Valdemar Munk 
+ * UnrealIRCd 4.0 (C) 2008 Carsten Valdemar Munk 
  * This program is free but copyrighted software; see
  *            the file COPYING for details.
  *
 
 /** Handle /CLOSE
  */
-class cmd_close : public Command
+class CommandClose : public Command
 {
  public:
        /* Command 'close', needs operator */
-       cmd_close (InspIRCd* Instance) : Command(Instance,"CLOSE", 'o', 0)
+       CommandClose (InspIRCd* Instance) : Command(Instance,"CLOSE", "o", 0)
        {
                this->source = "m_close.so";
        }
 
-       CmdResult Handle (const char** parameters, int pcnt, User *user)
+       CmdResult Handle (const char* const* parameters, int pcnt, User *user)
        {
                std::map<std::string,int> closed;
 
-               for (std::vector<User*>::iterator u = ServerInstance->local_users.begin(); u != ServerInstance->local_users.end(); u++)
+               for (std::vector<User*>::iterator u = ServerInstance->Users->local_users.begin(); u != ServerInstance->Users->local_users.end(); u++)
                {
                        if ((*u)->registered != REG_ALL)
                        {
@@ -55,14 +55,15 @@ class cmd_close : public Command
 
 class ModuleClose : public Module
 {
-       cmd_close* newcommand;
+       CommandClose* newcommand;
  public:
        ModuleClose(InspIRCd* Me)
                : Module(Me)
        {
                // Create a new command
-               newcommand = new cmd_close(ServerInstance);
+               newcommand = new CommandClose(ServerInstance);
                ServerInstance->AddCommand(newcommand);
+
        }
 
        virtual ~ModuleClose()