summaryrefslogtreecommitdiff
path: root/modules/commands/cs_set_misc.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-04-11 00:08:28 -0500
committerAdam <Adam@anope.org>2013-04-11 00:08:28 -0500
commit4f9b7874d6b3a41939ecc2e872ec08d03af7b5f1 (patch)
tree43162205d31b277c9ff12ee28b7e3a60d6382316 /modules/commands/cs_set_misc.cpp
parent207c46c871e85b55ae66acc456c6bc412c0c79f9 (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/commands/cs_set_misc.cpp')
-rw-r--r--modules/commands/cs_set_misc.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/modules/commands/cs_set_misc.cpp b/modules/commands/cs_set_misc.cpp
index 93897f332..e74587be1 100644
--- a/modules/commands/cs_set_misc.cpp
+++ b/modules/commands/cs_set_misc.cpp
@@ -138,26 +138,21 @@ class CSSetMisc : public Module
CSSetMisc(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
csmiscdata_type("CSMiscData", CSMiscData::Unserialize), commandcssetmisc(this)
{
-
Implementation i[] = { I_OnReload, I_OnChanInfo };
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
-
- this->OnReload();
}
- void OnReload()
+ void OnReload(ServerConfig *conf, ConfigReader &reader) anope_override
{
- ConfigReader config;
-
descriptions.clear();
- for (int i = 0; i < config.Enumerate("command"); ++i)
+ for (int i = 0; i < reader.Enumerate("command"); ++i)
{
- if (config.ReadValue("command", "command", "", i) != "chanserv/set/misc")
+ if (reader.ReadValue("command", "command", "", i) != "chanserv/set/misc")
continue;
- Anope::string cname = config.ReadValue("command", "name", "", i);
- Anope::string desc = config.ReadValue("command", "misc_description", "", i);
+ Anope::string cname = reader.ReadValue("command", "name", "", i);
+ Anope::string desc = reader.ReadValue("command", "misc_description", "", i);
if (cname.empty() || desc.empty())
continue;