diff options
Diffstat (limited to 'src/modules/m_hostchange.cpp')
-rw-r--r-- | src/modules/m_hostchange.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/modules/m_hostchange.cpp b/src/modules/m_hostchange.cpp index 7bf19313f..7fb14a1ba 100644 --- a/src/modules/m_hostchange.cpp +++ b/src/modules/m_hostchange.cpp @@ -32,18 +32,16 @@ class ModuleHostChange : public Module std::string MySuffix; public: - ModuleHostChange() + ModuleHostChange(Server* Me) + : Module::Module(Me) { - // We must create an instance of the Server class to work with - Srv = new Server; + Srv = Me; Conf = new ConfigReader; MySuffix = Conf->ReadValue("host","suffix",0); } virtual ~ModuleHostChange() { - // not really neccessary, but free it anyway - delete Srv; delete Conf; } @@ -122,9 +120,9 @@ class ModuleHostChangeFactory : public ModuleFactory { } - virtual Module * CreateModule() + virtual Module * CreateModule(Server* Me) { - return new ModuleHostChange; + return new ModuleHostChange(Me); } }; |