1
0
mirror of https://github.com/anope/anope.git synced 2026-07-03 13:23:14 +02:00

Fix m_ldap service names from defaulting ldap/ldap/main

This commit is contained in:
Adam
2013-07-21 00:37:21 -04:00
parent 5aac04dffe
commit e11abdc4f0
3 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -75,7 +75,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), admin_binddn(b), admin_pass(p), last_connect(0)
LDAPService(Module *o, const Anope::string &n, const Anope::string &s, int po, const Anope::string &b, const Anope::string &p) : LDAPProvider(o, n), server(s), port(po), admin_binddn(b), admin_pass(p), last_connect(0)
{
int i = ldap_initialize(&this->con, this->server.c_str());
if (i != LDAP_SUCCESS)
+8 -8
View File
@@ -74,7 +74,7 @@ class IdentifyInterface : public LDAPInterface
}
catch (const LDAPException &ex)
{
Log(this->owner) << "m_ldap_authentication: Error binding after search: " << ex.GetReason();
Log(this->owner) << "Error binding after search: " << ex.GetReason();
}
}
break;
@@ -94,7 +94,7 @@ class IdentifyInterface : public LDAPInterface
}
catch (const LDAPException &ex)
{
Log(this->owner) << "m_ldap_authentication: Unable to search for " << sf << ": " << ex.GetReason();
Log(this->owner) << "Unable to search for " << sf << ": " << ex.GetReason();
}
}
else
@@ -168,19 +168,19 @@ class OnIdentifyInterface : public LDAPInterface
BotInfo *NickServ = Config->GetClient("NickServ");
if (NickServ)
u->SendMessage(NickServ, _("Your email has been updated to \002%s\002"), email.c_str());
Log(this->owner) << "m_ldap_authentication: Updated email address for " << u->nick << " (" << u->Account()->display << ") to " << email;
Log(this->owner) << "Updated email address for " << u->nick << " (" << u->Account()->display << ") to " << email;
}
}
catch (const LDAPException &ex)
{
Log(this->owner) << "m_ldap_authentication: " << ex.GetReason();
Log(this->owner) << ex.GetReason();
}
}
void OnError(const LDAPResult &r) anope_override
{
this->requests.erase(r.id);
Log(this->owner) << "m_ldap_authentication: " << r.error;
Log(this->owner) << r.error;
}
};
@@ -191,12 +191,12 @@ class OnRegisterInterface : public LDAPInterface
void OnResult(const LDAPResult &r) anope_override
{
Log(this->owner) << "m_ldap_authentication: Successfully added newly created account to LDAP";
Log(this->owner) << "Successfully added newly created account to LDAP";
}
void OnError(const LDAPResult &r) anope_override
{
Log(this->owner) << "m_ldap_authentication: Error adding newly created account to LDAP: " << r.getError();
Log(this->owner) << "Error adding newly created account to LDAP: " << r.getError();
}
};
@@ -238,7 +238,7 @@ class NSIdentifyLDAP : public Module
if (!email_attribute.empty())
/* Don't complain to users about how they need to update their email, we will do it for them */
config->GetBlock("nickserv")->Set("forceemail", "false");
config->GetModule("nickserv")->Set("forceemail", "false");
}
EventReturn OnPreCommand(CommandSource &source, Command *command, std::vector<Anope::string> &params) anope_override
+1 -1
View File
@@ -199,7 +199,7 @@ class ModuleSQL : public Module, public Pipe
++it;
for (i = 0; i < config->CountBlock("mysql"); ++i)
if (config->GetBlock("mysql", i)->Get<const Anope::string>("name", "main") == cname)
if (config->GetBlock("mysql", i)->Get<const Anope::string>("name", "mysql/main") == cname)
break;
if (i == config->CountBlock("mysql"))