summaryrefslogtreecommitdiff
path: root/modules/extra
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-05-01 18:38:17 -0400
committerAdam <Adam@anope.org>2014-05-01 18:38:17 -0400
commitd79dd0b7d705e8f18ae0d6494a8bc65c2b0c2819 (patch)
tree6db0098bd6dc92b00004bda90757a3024621bc79 /modules/extra
parent8b2e8137f62fc9b88c0c9f6b065f6850490d5da6 (diff)
Pass password to nick register event so modules like m_ldap_authentication can create the respective account using the decrypted password which might not always be available
Diffstat (limited to 'modules/extra')
-rw-r--r--modules/extra/m_ldap_authentication.cpp6
-rw-r--r--modules/extra/m_sql_authentication.cpp2
-rw-r--r--modules/extra/stats/m_chanstats.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/modules/extra/m_ldap_authentication.cpp b/modules/extra/m_ldap_authentication.cpp
index 7c9593dff..115faa73e 100644
--- a/modules/extra/m_ldap_authentication.cpp
+++ b/modules/extra/m_ldap_authentication.cpp
@@ -104,7 +104,7 @@ class IdentifyInterface : public LDAPInterface
{
na = new NickAlias(ii->req->GetAccount(), new NickCore(ii->req->GetAccount()));
na->last_realname = ii->user ? ii->user->realname : ii->req->GetAccount();
- FOREACH_MOD(OnNickRegister, (ii->user, na));
+ FOREACH_MOD(OnNickRegister, (ii->user, na, ii->req->GetPassword()));
BotInfo *NickServ = Config->GetClient("NickServ");
if (ii->user && NickServ)
ii->user->SendMessage(NickServ, _("Your account \002%s\002 has been successfully created."), na->nick.c_str());
@@ -300,7 +300,7 @@ class NSIdentifyLDAP : public Module
}
}
- void OnNickRegister(User *, NickAlias *na) anope_override
+ void OnNickRegister(User *, NickAlias *na, const Anope::string &pass) anope_override
{
if (!this->disable_register_reason.empty() || !this->ldap)
return;
@@ -326,7 +326,7 @@ class NSIdentifyLDAP : public Module
}
attributes[3].name = this->password_attribute;
- attributes[3].values.push_back(na->nc->pass);
+ attributes[3].values.push_back(pass);
Anope::string new_dn = username_attribute + "=" + na->nick + "," + basedn;
this->ldap->Add(&this->orinterface, new_dn, attributes);
diff --git a/modules/extra/m_sql_authentication.cpp b/modules/extra/m_sql_authentication.cpp
index 2342ef89d..0710a6e20 100644
--- a/modules/extra/m_sql_authentication.cpp
+++ b/modules/extra/m_sql_authentication.cpp
@@ -42,7 +42,7 @@ class SQLAuthenticationResult : public SQL::Interface
if (na == NULL)
{
na = new NickAlias(req->GetAccount(), new NickCore(req->GetAccount()));
- FOREACH_MOD(OnNickRegister, (user, na));
+ FOREACH_MOD(OnNickRegister, (user, na, ""));
if (user && NickServ)
user->SendMessage(NickServ, _("Your account \002%s\002 has been successfully created."), na->nick.c_str());
}
diff --git a/modules/extra/stats/m_chanstats.cpp b/modules/extra/stats/m_chanstats.cpp
index 4151c4579..4557b816f 100644
--- a/modules/extra/stats/m_chanstats.cpp
+++ b/modules/extra/stats/m_chanstats.cpp
@@ -638,7 +638,7 @@ class MChanstats : public Module
ci->Extend<bool>("CS_STATS");
}
- void OnNickRegister(User *user, NickAlias *na)
+ void OnNickRegister(User *user, NickAlias *na, const Anope::string &)
{
if (NSDefChanstats)
na->nc->Extend<bool>("NS_STATS");