X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmodules%2Fm_devoice.cpp;h=0e6f68480d295ef1a98c56f05f0a26f8dcf5f58e;hb=f25c4b7a2263f5f3ce9bb41ba56b43c0d3a6d124;hp=31952d0028cec4e7bdde0d4889aa12e4d7d6f555;hpb=8de87c2a9b5f5e68caac1ca06b1021ed69cb3d6a;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_devoice.cpp b/src/modules/m_devoice.cpp index 31952d002..0e6f68480 100644 --- a/src/modules/m_devoice.cpp +++ b/src/modules/m_devoice.cpp @@ -2,8 +2,8 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2008 InspIRCd Development Team - * See: http://www.inspircd.org/wiki/index.php/Credits + * InspIRCd: (C) 2002-2009 InspIRCd Development Team + * 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); } };