mirror of
https://github.com/anope/anope.git
synced 2026-06-27 19:06:39 +02:00
Removed some unneeded/unused code from m_ldap
This commit is contained in:
@@ -2031,8 +2031,6 @@ ldap
|
||||
{
|
||||
server = "ldap://127.0.0.1"
|
||||
port = 389
|
||||
binddn = "cn=Manager,dc=anope,dc=org"
|
||||
password = "secret"
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user