]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_dccallow.cpp
Allow commands to optionally route themselves using ENCAP
[user/henk/code/inspircd.git] / src / modules / m_dccallow.cpp
index 56345932c56c0d3e92bd43b91a4cb3b0ad2a3815..97f0d2f13d916910e73b5f1eca9e80cde070d5cf 100644 (file)
@@ -244,15 +244,14 @@ class CommandDccallow : public Command
 
 class ModuleDCCAllow : public Module
 {
-       CommandDccallow* mycommand;
+       CommandDccallow cmd;
  public:
 
        ModuleDCCAllow(InspIRCd* Me)
-               : Module(Me)
+               : Module(Me), cmd(Me)
        {
                Conf = new ConfigReader(ServerInstance);
-               mycommand = new CommandDccallow(ServerInstance);
-               ServerInstance->AddCommand(mycommand);
+               ServerInstance->AddCommand(&cmd);
                ReadFileConf();
                Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_OnUserQuit, I_OnUserPreNick, I_OnRehash };
                ServerInstance->Modules->Attach(eventlist, this, 5);