]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_devoice.cpp
Remove InspIRCd* parameters and fields
[user/henk/code/inspircd.git] / src / modules / m_devoice.cpp
index 940f13c2d158825f84b7cc6db562e59237d16099..7c2dcb3d81fb85091bf51508f90b3ad552d2cae1 100644 (file)
@@ -25,9 +25,8 @@
 class CommandDevoice : public Command
 {
  public:
-       CommandDevoice (InspIRCd* Instance) : Command(Instance,"DEVOICE", 0, 1)
+       CommandDevoice(Module* Creator) : Command(Creator,"DEVOICE", 1)
        {
-               this->source = "m_devoice.so";
                syntax = "<channel>";
                TRANSLATE2(TR_TEXT, TR_END);
        }
@@ -44,7 +43,7 @@ class CommandDevoice : public Command
 
                        ServerInstance->SendMode(modes, ServerInstance->FakeClient);
                        ServerInstance->PI->SendMode(c->name, ServerInstance->Modes->GetLastParseParams(), ServerInstance->Modes->GetLastParseTranslate());
-                       return CMD_LOCALONLY;
+                       return CMD_SUCCESS;
                }
 
                return CMD_FAILURE;
@@ -53,14 +52,11 @@ class CommandDevoice : public Command
 
 class ModuleDeVoice : public Module
 {
-       CommandDevoice *mycommand;
+       CommandDevoice cmd;
  public:
-       ModuleDeVoice(InspIRCd* Me) : Module(Me)
+       ModuleDeVoice() : cmd(this)
        {
-
-               mycommand = new CommandDevoice(ServerInstance);
-               ServerInstance->AddCommand(mycommand);
-
+               ServerInstance->AddCommand(&cmd);
        }
 
        virtual ~ModuleDeVoice()
@@ -69,7 +65,7 @@ class ModuleDeVoice : public Module
 
        virtual Version GetVersion()
        {
-               return Version("$Id$", VF_VENDOR, API_VERSION);
+               return Version("Provides voiced users with the ability to devoice themselves.", VF_VENDOR, API_VERSION);
        }
 };