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/commands/cs_flags.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/commands/cs_flags.cpp')
-rw-r--r-- | modules/commands/cs_flags.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/modules/commands/cs_flags.cpp b/modules/commands/cs_flags.cpp index bdff5a6e5..cd1a14e83 100644 --- a/modules/commands/cs_flags.cpp +++ b/modules/commands/cs_flags.cpp @@ -394,24 +394,21 @@ class CSFlags : public Module Implementation i[] = { I_OnReload }; ModuleManager::Attach(i, this, 1); - - this->OnReload(); } - void OnReload() anope_override + void OnReload(ServerConfig *conf, ConfigReader &reader) anope_override { - ConfigReader config; defaultFlags.clear(); - for (int i = 0; i < config.Enumerate("privilege"); ++i) + for (int i = 0; i < reader.Enumerate("privilege"); ++i) { - const Anope::string &pname = config.ReadValue("privilege", "name", "", i); + const Anope::string &pname = reader.ReadValue("privilege", "name", "", i); Privilege *p = PrivilegeManager::FindPrivilege(pname); if (p == NULL) continue; - const Anope::string &value = config.ReadValue("privilege", "flag", "", i); + const Anope::string &value = reader.ReadValue("privilege", "flag", "", i); if (value.empty()) continue; |