X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_chanprotect.cpp;h=25ff6b12aa72d2ce1317f49933a020e86e7949ac;hb=43fe72edad4c5dfd1a3a700bea17c8ee7a7c3d8e;hp=a9764f72e6db21642d4205a533342996fb80d8ef;hpb=1424c78e7e1449854f8330b45705c114619fb855;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp index a9764f72e..25ff6b12a 100644 --- a/src/modules/m_chanprotect.cpp +++ b/src/modules/m_chanprotect.cpp @@ -34,13 +34,14 @@ class ModuleChanProtect : public Module public: - ModuleChanProtect() + ModuleChanProtect(Server* Me) + : Module::Module(Me) { // here we initialise our module. Use new to create new instances of the required // classes. - Srv = new Server; + Srv = Me; Conf = new ConfigReader; // set up our modes. We're using listmodes and not normal extmodes here. @@ -327,7 +328,6 @@ class ModuleChanProtect : public Module virtual ~ModuleChanProtect() { delete Conf; - delete Srv; } virtual Version GetVersion() @@ -369,9 +369,9 @@ class ModuleChanProtectFactory : public ModuleFactory { } - virtual Module * CreateModule() + virtual Module * CreateModule(Server* Me) { - return new ModuleChanProtect; + return new ModuleChanProtect(Me); } };