diff options
author | Adam <Adam@anope.org> | 2013-05-05 01:55:04 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-05-05 01:55:04 -0400 |
commit | 1d0bb9b26b7ad58ab0bf979ac046f4511b3bf12b (patch) | |
tree | 4486f0784bdf050fd7eb225c0cb9df352ce1f45a /modules/m_helpchan.cpp | |
parent | 781defb7076ddfddf723ca08cd0a518b6657b64f (diff) |
Rework the config file reader to be much more flexible and move many configuration directives to the actual modules they are used in.
Diffstat (limited to 'modules/m_helpchan.cpp')
-rw-r--r-- | modules/m_helpchan.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/modules/m_helpchan.cpp b/modules/m_helpchan.cpp index d39b5afd9..4768fec71 100644 --- a/modules/m_helpchan.cpp +++ b/modules/m_helpchan.cpp @@ -9,18 +9,16 @@ class HelpChannel : public Module { - Anope::string HelpChan; - public: HelpChannel(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) { - Implementation i[] = { I_OnChannelModeSet, I_OnReload }; + Implementation i[] = { I_OnChannelModeSet }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); } EventReturn OnChannelModeSet(Channel *c, MessageSource &setter, const Anope::string &mname, const Anope::string ¶m) anope_override { - if (mname == "OP" && c && c->ci && c->name.equals_ci(this->HelpChan)) + if (mname == "OP" && c && c->ci && c->name.equals_ci(Config->GetModule(this)->Get<const Anope::string &>("helpchannel"))) { User *u = User::Find(param); @@ -30,11 +28,6 @@ class HelpChannel : public Module return EVENT_CONTINUE; } - - void OnReload(ServerConfig *conf, ConfigReader &reader) anope_override - { - this->HelpChan = reader.ReadValue("m_helpchan", "helpchannel", "", 0); - } }; MODULE_INIT(HelpChannel) |