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

Make email confirmation a bit smarter.

This commit is contained in:
Sadie Powell
2025-02-11 11:44:05 +00:00
parent a8be208da1
commit e3abae44a7
2 changed files with 6 additions and 2 deletions
+4 -1
View File
@@ -86,8 +86,11 @@ module
/*
* Require users who change their email address to confirm they
* own their new email.
*
* If {ns_register}:registration is set to mail then this defaults
* to yes. Otherwise, it defaults to no.
*/
confirmemailchanges = no
#confirmemailchanges = yes
/*
* A message sent to users on connect if they use an unregistered nick. %n will be replaced with the user's nickname.
+2 -1
View File
@@ -598,7 +598,8 @@ public:
if (MOD_RESULT == EVENT_STOP)
return;
if (!param.empty() && Config->GetModule("nickserv")->Get<bool>("confirmemailchanges") && !source.IsServicesOper())
const auto nsmailreg = Config->GetModule("ns_register")->Get<const Anope::string>("registration").equals_ci("mail");
if (!param.empty() && Config->GetModule("nickserv")->Get<bool>("confirmemailchanges", nsmailreg ? "yes" : "no") && !source.IsServicesOper())
{
if (SendConfirmMail(source.GetUser(), source.GetAccount(), source.service, param))
{