X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_devoice.cpp;h=7c2dcb3d81fb85091bf51508f90b3ad552d2cae1;hb=6d03943426dcce76ba66567a9b18425a5ebb4c0c;hp=940f13c2d158825f84b7cc6db562e59237d16099;hpb=e5cb25bd13326b9e0d1c275638f3f8f4ffba213a;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_devoice.cpp b/src/modules/m_devoice.cpp index 940f13c2d..7c2dcb3d8 100644 --- a/src/modules/m_devoice.cpp +++ b/src/modules/m_devoice.cpp @@ -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 = ""; 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); } };