]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_devoice.cpp
Include explicit routing information in Command, will replace CMD_LOCALONLY return...
[user/henk/code/inspircd.git] / src / modules / m_devoice.cpp
index dcf1cefa70afad9b6526d499174f4188527e7d02..0e6f68480d295ef1a98c56f05f0a26f8dcf5f58e 100644 (file)
@@ -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);
        }
 };