diff options
| author | 2005-12-07 17:05:34 +0000 | |
|---|---|---|
| committer | 2005-12-07 17:05:34 +0000 | |
| commit | 2d821f2980825be73e3f90b47ffff365b0ec5ecb (patch) | |
| tree | 5063e20e64555f26c357ccae5ab99e54e899c69d /src/modules/m_censor.cpp | |
| parent | Added insane tag (prevents wide gline etc) (diff) | |
Changed behaviour of module API to pass Server* to the constructor, rather than have to create one (makes more sense)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2252 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_censor.cpp')
| -rw-r--r-- | src/modules/m_censor.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/modules/m_censor.cpp b/src/modules/m_censor.cpp index 94dbec852..e396a3e51 100644 --- a/src/modules/m_censor.cpp +++ b/src/modules/m_censor.cpp @@ -31,14 +31,15 @@ class ModuleCensor : public Module ConfigReader *Conf, *MyConf; public: - ModuleCensor() + ModuleCensor(Server* Me) + : Module::Module(Me) { // read the configuration file on startup. // it is perfectly valid to set <censor file> to the value of the // main config file, then append your <badword> tags to the bottom // of the main config... but rather messy. That's why the capability // of using a seperate config file is provided. - Srv = new Server; + Srv = Me; Conf = new ConfigReader; std::string Censorfile = Conf->ReadValue("censor","file",0); MyConf = new ConfigReader(Censorfile); @@ -88,7 +89,6 @@ class ModuleCensor : public Module virtual ~ModuleCensor() { - delete Srv; delete MyConf; delete Conf; } @@ -208,9 +208,9 @@ class ModuleCensorFactory : public ModuleFactory { } - virtual Module * CreateModule() + virtual Module * CreateModule(Server* Me) { - return new ModuleCensor; + return new ModuleCensor(Me); } }; |
