diff options
Diffstat (limited to 'src/modules/m_override.cpp')
-rw-r--r-- | src/modules/m_override.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp index a1e78812d..8f0b0aa2d 100644 --- a/src/modules/m_override.cpp +++ b/src/modules/m_override.cpp @@ -48,22 +48,20 @@ class ModuleOverride : public Module virtual void OnRehash(User* user, const std::string ¶meter) { // on a rehash we delete our classes for good measure and create them again. - ConfigReader* Conf = new ConfigReader(ServerInstance); + ConfigReader Conf(ServerInstance); // re-read our config options on a rehash - NoisyOverride = Conf->ReadFlag("override", "noisy", 0); - RequireKey = Conf->ReadFlag("override", "requirekey", 0); + NoisyOverride = Conf.ReadFlag("override", "noisy", 0); + RequireKey = Conf.ReadFlag("override", "requirekey", 0); overrides.clear(); - for (int j =0; j < Conf->Enumerate("type"); j++) + for (int j =0; j < Conf.Enumerate("type"); j++) { - std::string typen = Conf->ReadValue("type","name",j); - std::string tokenlist = Conf->ReadValue("type","override",j); + std::string typen = Conf.ReadValue("type","name",j); + std::string tokenlist = Conf.ReadValue("type","override",j); overrides[typen] = tokenlist; } - - delete Conf; } |