summaryrefslogtreecommitdiff
path: root/modules/commands/ns_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/ns_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/ns_set_misc.cpp')
-rw-r--r--modules/commands/ns_set_misc.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/modules/commands/ns_set_misc.cpp b/modules/commands/ns_set_misc.cpp
index 35210abd0..5ee77a938 100644
--- a/modules/commands/ns_set_misc.cpp
+++ b/modules/commands/ns_set_misc.cpp
@@ -157,26 +157,21 @@ class NSSetMisc : public Module
NSSetMisc(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
nsmiscdata_type("NSMiscData", NSMiscData::Unserialize), commandnssetmisc(this), commandnssasetmisc(this)
{
-
Implementation i[] = { I_OnReload, I_OnNickInfo };
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) != "nickserv/set/misc" && config.ReadValue("command", "command", "", i) != "nickserv/saset/misc")
+ if (reader.ReadValue("command", "command", "", i) != "nickserv/set/misc" && reader.ReadValue("command", "command", "", i) != "nickserv/saset/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;