X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_devoice.cpp;h=0e6f68480d295ef1a98c56f05f0a26f8dcf5f58e;hb=f25c4b7a2263f5f3ce9bb41ba56b43c0d3a6d124;hp=dcf1cefa70afad9b6526d499174f4188527e7d02;hpb=43847ec9c7e1a195163eb4c529f1c92fd1ace0a4;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_devoice.cpp b/src/modules/m_devoice.cpp index dcf1cefa7..0e6f68480 100644 --- a/src/modules/m_devoice.cpp +++ b/src/modules/m_devoice.cpp @@ -3,7 +3,7 @@ * +------------------------------------+ * * InspIRCd: (C) 2002-2009 InspIRCd Development Team - * See: http://www.inspircd.org/wiki/index.php/Credits + * See: http://wiki.inspircd.org/Credits * * This program is free but copyrighted software; see * the file COPYING for details. @@ -43,9 +43,8 @@ class CommandDevoice : public Command modes.push_back(user->nick); ServerInstance->SendMode(modes, ServerInstance->FakeClient); - - /* route it -- SendMode doesn't distribute over the whole network */ - return CMD_SUCCESS; + ServerInstance->PI->SendMode(c->name, ServerInstance->Modes->GetLastParseParams(), ServerInstance->Modes->GetLastParseTranslate()); + return CMD_LOCALONLY; } return CMD_FAILURE; @@ -54,14 +53,11 @@ class CommandDevoice : public Command class ModuleDeVoice : public Module { - CommandDevoice *mycommand; + CommandDevoice cmd; public: - ModuleDeVoice(InspIRCd* Me) : Module(Me) + ModuleDeVoice(InspIRCd* Me) : Module(Me), cmd(Me) { - - mycommand = new CommandDevoice(ServerInstance); - ServerInstance->AddCommand(mycommand); - + ServerInstance->AddCommand(&cmd); } virtual ~ModuleDeVoice() @@ -70,7 +66,7 @@ class ModuleDeVoice : public Module virtual Version GetVersion() { - return Version("$Id$", VF_COMMON | VF_VENDOR, API_VERSION); + return Version("$Id$", VF_VENDOR, API_VERSION); } };