summaryrefslogtreecommitdiff
path: root/modules/extra/m_ldap_oper.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/extra/m_ldap_oper.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/extra/m_ldap_oper.cpp')
-rw-r--r--modules/extra/m_ldap_oper.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/modules/extra/m_ldap_oper.cpp b/modules/extra/m_ldap_oper.cpp
index f44628c63..afe3fde48 100644
--- a/modules/extra/m_ldap_oper.cpp
+++ b/modules/extra/m_ldap_oper.cpp
@@ -91,19 +91,15 @@ class LDAPOper : public Module
Implementation i[] = { I_OnReload, I_OnNickIdentify, I_OnDelCore };
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
-
- OnReload();
}
- void OnReload() anope_override
+ void OnReload(ServerConfig *conf, ConfigReader &reader) anope_override
{
- ConfigReader config;
-
- this->binddn = config.ReadValue("m_ldap_oper", "binddn", "", 0);
- this->password = config.ReadValue("m_ldap_oper", "password", "", 0);
- this->basedn = config.ReadValue("m_ldap_oper", "basedn", "", 0);
- this->filter = config.ReadValue("m_ldap_oper", "filter", "", 0);
- opertype_attribute = config.ReadValue("m_ldap_oper", "opertype_attribute", "", 0);
+ this->binddn = reader.ReadValue("m_ldap_oper", "binddn", "", 0);
+ this->password = reader.ReadValue("m_ldap_oper", "password", "", 0);
+ this->basedn = reader.ReadValue("m_ldap_oper", "basedn", "", 0);
+ this->filter = reader.ReadValue("m_ldap_oper", "filter", "", 0);
+ opertype_attribute = reader.ReadValue("m_ldap_oper", "opertype_attribute", "", 0);
for (std::set<Oper *>::iterator it = my_opers.begin(), it_end = my_opers.end(); it != it_end; ++it)
delete *it;