From 573e49a7ead331219eb6f0d3ca9cf83e793a5c9c Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 23 Apr 2012 05:08:26 -0400 Subject: Reworked live SQL support yet again --- modules/extra/m_ldap_authentication.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'modules/extra/m_ldap_authentication.cpp') 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; -- cgit