X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fextra%2Fm_ldapoper.cpp;h=e8455529d617ba669a06b946d116d80e70b4a86a;hb=ac7defcd3e52695dcf5e5150e9fe3e1624205e64;hp=2166b0823725cd393efedda8646fb24873d9e292;hpb=5b9682275e384635a1fd9f7320cf4d9a604a43b4;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/extra/m_ldapoper.cpp b/src/modules/extra/m_ldapoper.cpp index 2166b0823..e8455529d 100644 --- a/src/modules/extra/m_ldapoper.cpp +++ b/src/modules/extra/m_ldapoper.cpp @@ -45,8 +45,8 @@ class ModuleLDAPAuth : public Module LDAP *conn; public: - ModuleLDAPAuth() - { + void init() + { conn = NULL; Implementation eventlist[] = { I_OnRehash, I_OnPassCompare }; ServerInstance->Modules->Attach(eventlist, this, 2); @@ -61,13 +61,13 @@ public: virtual void OnRehash(User* user) { - ConfigReader Conf; + ConfigTag* tag = ServerInstance->Config->ConfValue("ldapoper"); - base = Conf.ReadValue("ldapoper", "baserdn", 0); - ldapserver = Conf.ReadValue("ldapoper", "server", 0); - std::string scope = Conf.ReadValue("ldapoper", "searchscope", 0); - username = Conf.ReadValue("ldapoper", "binddn", 0); - password = Conf.ReadValue("ldapoper", "bindauth", 0); + base = tag->getString("baserdn"); + ldapserver = tag->getString("server"); + std::string scope = tag->getString("searchscope"); + username = tag->getString("binddn"); + password = tag->getString("bindaut"); if (scope == "base") searchscope = LDAP_SCOPE_BASE;