]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_clones.cpp
Merge pull request #1162 from SaberUK/insp20+fix-deinstall
[user/henk/code/inspircd.git] / src / modules / m_clones.cpp
index 1e5841609fa875f8f9a8c45450aabb8b8120067b..92b1bda78fb8a8d4d186a072405c1a56340294ed 100644 (file)
@@ -21,9 +21,9 @@
 
 #include "inspircd.h"
 
-/* $ModDesc: Provides the /clones command to retrieve information on clones. */
+/* $ModDesc: Provides the /CLONES command to retrieve information on clones. */
 
-/** Handle /CHECK
+/** Handle /CLONES
  */
 class CommandClones : public Command
 {
@@ -36,7 +36,7 @@ class CommandClones : public Command
        CmdResult Handle (const std::vector<std::string> &parameters, User *user)
        {
 
-               std::string clonesstr = "304 " + std::string(user->nick) + " :CLONES";
+               std::string clonesstr = "304 " + user->nick + " :CLONES";
 
                unsigned long limit = atoi(parameters[0].c_str());
 
@@ -44,7 +44,7 @@ class CommandClones : public Command
                 * Syntax of a /clones reply:
                 *  :server.name 304 target :CLONES START
                 *  :server.name 304 target :CLONES <count> <ip>
-                *  :server.name 304 target :CHECK END
+                *  :server.name 304 target :CLONES END
                 */
 
                user->WriteServ(clonesstr + " START");
@@ -71,7 +71,11 @@ class ModuleClones : public Module
  public:
        ModuleClones() : cmd(this)
        {
-               ServerInstance->AddCommand(&cmd);
+       }
+
+       void init()
+       {
+               ServerInstance->Modules->AddService(cmd);
        }
 
        virtual ~ModuleClones()
@@ -80,7 +84,7 @@ class ModuleClones : public Module
 
        virtual Version GetVersion()
        {
-               return Version("Provides the /clones command to retrieve information on clones.", VF_VENDOR);
+               return Version("Provides the /CLONES command to retrieve information on clones.", VF_VENDOR);
        }