X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_cloaking.cpp;h=7bcfb0af273a86f541d385466bea8746e77db3a8;hb=ea7aa89d61f5090ee7e7ecbe9eb633e1189ce40a;hp=44a03a39b355416e3450f0993a42db68544903bc;hpb=1661e2aaa919e33b39b3b25e771840845e4180dd;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index 44a03a39b..7bcfb0af2 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -29,7 +29,10 @@ using namespace std; // the server->server link, and all encoding of hosts is // done locally on the server by this module. -#include +#include +#include +#include +#include #include "users.h" #include "channels.h" #include "modules.h" @@ -268,10 +271,11 @@ class ModuleCloaking : public Module } public: - ModuleCloaking() + ModuleCloaking(Server* Me) + : Module::Module(Me) { - // We must create an instance of the Server class to work with - Srv = new Server; + // We must take a copy of the Server class to work with + Srv = Me; // we must create a new mode. Set the parameters so the // mode doesn't require oper, and is a client usermode @@ -291,8 +295,6 @@ class ModuleCloaking : public Module virtual ~ModuleCloaking() { - // not really neccessary, but free it anyway - delete Srv; } virtual Version GetVersion() @@ -401,9 +403,9 @@ class ModuleCloakingFactory : public ModuleFactory { } - virtual Module * CreateModule() + virtual Module * CreateModule(Server* Me) { - return new ModuleCloaking; + return new ModuleCloaking(Me); } };