diff options
author | Adam <Adam@anope.org> | 2011-03-31 14:41:30 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-03-31 14:41:30 -0400 |
commit | faa85564fc29495ef47254ddc17a2846ef20e2ad (patch) | |
tree | 006ad832c22f473cbc24a78db9f66fab86d531c1 | |
parent | 8dec0c1f1798845a47914570869ed94ce44ce58d (diff) |
Removed some unneeded/unused code from m_ldap
-rw-r--r-- | data/example.conf | 2 | ||||
-rw-r--r-- | modules/extra/m_ldap.cpp | 8 | ||||
-rw-r--r-- | modules/extra/ns_identify_ldap.cpp | 2 |
3 files changed, 3 insertions, 9 deletions
diff --git a/data/example.conf b/data/example.conf index 7895f63ac..a677e3067 100644 --- a/data/example.conf +++ b/data/example.conf @@ -2031,8 +2031,6 @@ ldap { server = "ldap://127.0.0.1" port = 389 - binddn = "cn=Manager,dc=anope,dc=org" - password = "secret" } /* diff --git a/modules/extra/m_ldap.cpp b/modules/extra/m_ldap.cpp index aa7e5212e..c7f0914a0 100644 --- a/modules/extra/m_ldap.cpp +++ b/modules/extra/m_ldap.cpp @@ -10,8 +10,6 @@ class LDAPService : public LDAPProvider, public Thread, public Condition { Anope::string server; int port; - Anope::string binddn; - Anope::string password; LDAP *con; @@ -21,7 +19,7 @@ class LDAPService : public LDAPProvider, public Thread, public Condition query_queue queries; result_queue results; - LDAPService(Module *o, const Anope::string &n, const Anope::string &s, int po, const Anope::string &b, const Anope::string &p) : LDAPProvider(o, "ldap/" + n), server(s), port(po), binddn(b), password(p) + LDAPService(Module *o, const Anope::string &n, const Anope::string &s, int po) : LDAPProvider(o, "ldap/" + n), server(s), port(po) { if (ldap_initialize(&this->con, this->server.c_str()) != LDAP_SUCCESS) throw LDAPException("Unable to connect to LDAP service " + this->name + ": " + Anope::LastError()); @@ -264,12 +262,10 @@ class ModuleLDAP : public Module, public Pipe { Anope::string server = config.ReadValue("ldap", "server", "127.0.0.1", i); int port = config.ReadInteger("ldap", "port", "389", i, true); - Anope::string binddn = config.ReadValue("ldap", "binddn", "", i); - Anope::string password = config.ReadValue("ldap", "password", "", i); try { - LDAPService *ss = new LDAPService(this, connname, server, port, binddn, password); + LDAPService *ss = new LDAPService(this, connname, server, port); this->LDAPServices.insert(std::make_pair(connname, ss)); ModuleManager::RegisterService(ss); diff --git a/modules/extra/ns_identify_ldap.cpp b/modules/extra/ns_identify_ldap.cpp index bf98cbeac..8a65c5438 100644 --- a/modules/extra/ns_identify_ldap.cpp +++ b/modules/extra/ns_identify_ldap.cpp @@ -120,7 +120,7 @@ class OnIdentifyInterface : public LDAPInterface if (!email.equals_ci(u->Account()->email)) { u->Account()->email = email; - u->SendMessage(NickServ, "Your email has been updated to \002%s\002", email.c_str()); + u->SendMessage(NickServ, _("Your email has been updated to \002%s\002"), email.c_str()); Log() << "ns_identify_ldap: Updated email address for " << u->nick << " (" << u->Account()->display << ") to " << email; } } |