aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_alias.cpp
diff options
context:
space:
mode:
authorGravatar attilamolnar2013-08-16 12:10:55 +0200
committerGravatar attilamolnar2013-08-30 13:15:10 +0200
commitc202dea024542b9c6c6b771bb9a3a081d9eacdc5 (patch)
tree64f4d5f5c18e685d3cd360107664eec644d5585d /src/modules/m_alias.cpp
parentMerge insp20 (diff)
Replace OnRehash() with ReadConfig() that is called on boot, on module load and on rehash
This eliminates the need for calling OnRehash() in init()
Diffstat (limited to 'src/modules/m_alias.cpp')
-rw-r--r--src/modules/m_alias.cpp14
1 files changed, 2 insertions, 12 deletions
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.