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/modules/m_alias.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'src/modules/m_alias.cpp') diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp index 4d942854c..7d2eabd15 100644 --- a/src/modules/m_alias.cpp +++ b/src/modules/m_alias.cpp @@ -69,7 +69,8 @@ class ModuleAlias : public Module bool AllowBots; UserModeReference botmode; - void ReadAliases() + public: + void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE { ConfigTag* fantasy = ServerInstance->Config->ConfValue("fantasy"); AllowBots = fantasy->getBool("allowbots", false); @@ -96,17 +97,11 @@ class ModuleAlias : public Module } } - public: ModuleAlias() : botmode(this, "bot") { } - void init() CXX11_OVERRIDE - { - ReadAliases(); - } - Version GetVersion() CXX11_OVERRIDE { return Version("Provides aliases of commands.", VF_VENDOR); @@ -369,11 +364,6 @@ class ModuleAlias : public Module ServerInstance->Parser->CallHandler(command, pars, user); } - void OnRehash(User* user) CXX11_OVERRIDE - { - ReadAliases(); - } - void Prioritize() { // Prioritise after spanningtree so that channel aliases show the alias before the effects. -- cgit v1.3.1-10-gc9f91