summaryrefslogtreecommitdiff
path: root/modules/extra/m_ldap_authentication.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-04-23 05:08:26 -0400
committerAdam <Adam@anope.org>2012-04-23 05:08:26 -0400
commit573e49a7ead331219eb6f0d3ca9cf83e793a5c9c (patch)
treee145e04fa3d041cf92ce46da4ac790b63231059c /modules/extra/m_ldap_authentication.cpp
parent63c639e108a00d7dbb0d7ac9891684fc83a3b207 (diff)
Reworked live SQL support yet again
Diffstat (limited to 'modules/extra/m_ldap_authentication.cpp')
-rw-r--r--modules/extra/m_ldap_authentication.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/extra/m_ldap_authentication.cpp b/modules/extra/m_ldap_authentication.cpp
index a34e6a709..e3267f9e0 100644
--- a/modules/extra/m_ldap_authentication.cpp
+++ b/modules/extra/m_ldap_authentication.cpp
@@ -58,7 +58,7 @@ class IdentifyInterface : public LDAPInterface
if (Config->NSAddAccessOnReg)
na->nc->AddAccess(create_mask(u));
- BotInfo *bi = findbot(Config->NickServ);
+ const BotInfo *bi = findbot(Config->NickServ);
if (bi)
u->SendMessage(bi, _("Your account \002%s\002 has been successfully created."), na->nick.c_str());
}
@@ -123,10 +123,11 @@ class OnIdentifyInterface : public LDAPInterface
const LDAPAttributes &attr = r.get(0);
Anope::string email = attr.get(email_attribute);
- if (!email.equals_ci(u->Account()->email))
+ NickCore *nc = u->Account();
+ if (!email.equals_ci(nc->email))
{
- u->Account()->email = email;
- BotInfo *bi = findbot(Config->NickServ);
+ nc->email = email;
+ const BotInfo *bi = findbot(Config->NickServ);
if (bi)
u->SendMessage(bi, _("Your email has been updated to \002%s\002"), email.c_str());
Log() << "m_ldap_authentication: Updated email address for " << u->nick << " (" << u->Account()->display << ") to " << email;