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:
@@ -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.
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user