diff options
author | Adam <Adam@anope.org> | 2013-04-11 00:08:28 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-04-11 00:08:28 -0500 |
commit | 4f9b7874d6b3a41939ecc2e872ec08d03af7b5f1 (patch) | |
tree | 43162205d31b277c9ff12ee28b7e3a60d6382316 /modules/m_helpchan.cpp | |
parent | 207c46c871e85b55ae66acc456c6bc412c0c79f9 (diff) |
Pass new config and the new config reader to the OnReload event, aswell as call it on module load on modules that hook to it
Diffstat (limited to 'modules/m_helpchan.cpp')
-rw-r--r-- | modules/m_helpchan.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/modules/m_helpchan.cpp b/modules/m_helpchan.cpp index e0163b925..d39b5afd9 100644 --- a/modules/m_helpchan.cpp +++ b/modules/m_helpchan.cpp @@ -14,11 +14,8 @@ class HelpChannel : public Module public: HelpChannel(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) { - Implementation i[] = { I_OnChannelModeSet, I_OnReload }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); - - OnReload(); } EventReturn OnChannelModeSet(Channel *c, MessageSource &setter, const Anope::string &mname, const Anope::string ¶m) anope_override @@ -34,11 +31,9 @@ class HelpChannel : public Module return EVENT_CONTINUE; } - void OnReload() anope_override + void OnReload(ServerConfig *conf, ConfigReader &reader) anope_override { - ConfigReader config; - - this->HelpChan = config.ReadValue("m_helpchan", "helpchannel", "", 0); + this->HelpChan = reader.ReadValue("m_helpchan", "helpchannel", "", 0); } }; |