]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_setname.cpp
Flexible SendQ
[user/henk/code/inspircd.git] / src / modules / m_setname.cpp
index 846edf0fef7fbe0aaa078a10e3fb234243726ce1..c0e32da7329a137c99dd3263f9280e24c4e287c9 100644 (file)
@@ -20,9 +20,8 @@
 class CommandSetname : public Command
 {
  public:
-       CommandSetname (InspIRCd* Instance) : Command(Instance,"SETNAME", 0, 1, 1)
+       CommandSetname(Module* Creator) : Command(Creator,"SETNAME", 1, 1)
        {
-               this->source = "m_setname.so";
                syntax = "<new-gecos>";
                TRANSLATE2(TR_TEXT, TR_END);
        }
@@ -54,15 +53,12 @@ class CommandSetname : public Command
 
 class ModuleSetName : public Module
 {
-       CommandSetname* mycommand;
+       CommandSetname cmd;
  public:
-       ModuleSetName(InspIRCd* Me)
-               : Module(Me)
+       ModuleSetName()
+               : cmd(this)
        {
-
-               mycommand = new CommandSetname(ServerInstance);
-               ServerInstance->AddCommand(mycommand);
-
+               ServerInstance->AddCommand(&cmd);
        }
 
        virtual ~ModuleSetName()
@@ -71,9 +67,8 @@ class ModuleSetName : public Module
 
        virtual Version GetVersion()
        {
-               return Version("$Id$", VF_COMMON | VF_VENDOR, API_VERSION);
+               return Version("Provides support for the SETNAME command", VF_VENDOR, API_VERSION);
        }
-
 };
 
 MODULE_INIT(ModuleSetName)