From c202dea024542b9c6c6b771bb9a3a081d9eacdc5 Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Fri, 16 Aug 2013 12:10:55 +0200 Subject: Replace OnRehash() with ReadConfig() that is called on boot, on module load and on rehash This eliminates the need for calling OnRehash() in init() --- src/commands/cmd_dns.cpp | 4 +--- src/commands/cmd_whowas.cpp | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'src/commands') diff --git a/src/commands/cmd_dns.cpp b/src/commands/cmd_dns.cpp index 2b7114128..f97d68783 100644 --- a/src/commands/cmd_dns.cpp +++ b/src/commands/cmd_dns.cpp @@ -798,11 +798,9 @@ class ModuleDNS : public Module void init() { ServerInstance->Modules->AddService(this->manager); - - this->OnRehash(NULL); } - void OnRehash(User* user) + void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE { std::string oldserver = DNSServer; DNSServer = ServerInstance->Config->ConfValue("dns")->getString("server"); diff --git a/src/commands/cmd_whowas.cpp b/src/commands/cmd_whowas.cpp index 75d1ee8ff..ea1020fbc 100644 --- a/src/commands/cmd_whowas.cpp +++ b/src/commands/cmd_whowas.cpp @@ -231,7 +231,6 @@ class ModuleWhoWas : public Module void init() { ServerInstance->Modules->AddService(cmd); - OnRehash(NULL); } void OnGarbageCollect() @@ -253,7 +252,7 @@ class ModuleWhoWas : public Module return MOD_RES_PASSTHRU; } - void OnRehash(User* user) + void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE { ConfigTag* tag = ServerInstance->Config->ConfValue("whowas"); unsigned int NewGroupSize = tag->getInt("groupsize", 10, 0, 10000); -- cgit v1.2.3