]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_clones.cpp
Allow commands to optionally route themselves using ENCAP
[user/henk/code/inspircd.git] / src / modules / m_clones.cpp
index a2b4e35fa46abe073960405da110d8f01fca02f5..58ecff17d22ab6b547d934d2622dfd2ac2e351f3 100644 (file)
@@ -2,8 +2,8 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
  *            the file COPYING for details.
@@ -12,9 +12,8 @@
  */
 
 #include "inspircd.h"
-#include "wildcard.h"
 
-/* $ModDesc: Provides the /clones command to retrieve information on a user, channel, or IP address */
+/* $ModDesc: Provides the /clones command to retrieve information on clones. */
 
 /** Handle /CHECK
  */
@@ -27,12 +26,12 @@ class CommandClones : public Command
                syntax = "<limit>";
        }
 
-       CmdResult Handle (const char* const* parameters, int pcnt, User *user)
+       CmdResult Handle (const std::vector<std::string> &parameters, User *user)
        {
 
                std::string clonesstr = "304 " + std::string(user->nick) + " :CLONES";
 
-               unsigned long limit = atoi(parameters[0]);
+               unsigned long limit = atoi(parameters[0].c_str());
 
                /*
                 * Syntax of a /clones reply:
@@ -61,26 +60,23 @@ class CommandClones : public Command
 class ModuleClones : public Module
 {
  private:
-       CommandClones *mycommand;
+       CommandClones cmd;
  public:
-       ModuleClones(InspIRCd* Me) : Module(Me)
+       ModuleClones(InspIRCd* Me) : Module(Me), cmd(Me)
        {
-               
-               mycommand = new CommandClones(ServerInstance);
-               ServerInstance->AddCommand(mycommand);
-
+               ServerInstance->AddCommand(&cmd);
        }
-       
+
        virtual ~ModuleClones()
        {
        }
-       
+
        virtual Version GetVersion()
        {
-               return Version(1, 1, 0, 0, VF_VENDOR, API_VERSION);
+               return Version("$Id$", VF_VENDOR, API_VERSION);
        }
 
-       
+
 };
 
 MODULE_INIT(ModuleClones)