#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
{
CmdResult Handle (const std::vector<std::string> ¶meters, 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());
* 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");
}
};
-
class ModuleClones : public Module
{
- private:
CommandClones cmd;
public:
ModuleClones() : cmd(this)
{
- ServerInstance->AddCommand(&cmd);
}
- virtual ~ModuleClones()
+ void init()
{
+ ServerInstance->Modules->AddService(cmd);
}
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);
}
-
-
};
MODULE_INIT(ModuleClones)