From d79dd0b7d705e8f18ae0d6494a8bc65c2b0c2819 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 1 May 2014 18:38:17 -0400 Subject: 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 --- modules/extra/m_sql_authentication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/extra/m_sql_authentication.cpp') 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()); } -- cgit From 866f3f32ab3713e9867747f150df3698e456744e Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 20 May 2014 21:10:49 -0400 Subject: Speed up akill xline checks Cache xline nick, user, host, etc instead of rebuilding it everytime its requested. Store users ip in sockaddr form and not string form to prevent having to rebuild sockaddrs when checking xlines. Also do not try to convert empty config values in Config::Get as this can be rather common if a non string configuration value is not set, and the cost of the ConvertException is great. --- modules/extra/m_sql_authentication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/extra/m_sql_authentication.cpp') diff --git a/modules/extra/m_sql_authentication.cpp b/modules/extra/m_sql_authentication.cpp index 0710a6e20..c718f3c2b 100644 --- a/modules/extra/m_sql_authentication.cpp +++ b/modules/extra/m_sql_authentication.cpp @@ -122,7 +122,7 @@ class ModuleSQLAuthentication : public Module if (u) { q.SetValue("n", u->nick); - q.SetValue("i", u->ip); + q.SetValue("i", u->ip.addr()); } else { -- cgit