diff --git a/data/nickserv.example.conf b/data/nickserv.example.conf index 9c46979a7..ad41ba37f 100644 --- a/data/nickserv.example.conf +++ b/data/nickserv.example.conf @@ -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. diff --git a/modules/nickserv/ns_set.cpp b/modules/nickserv/ns_set.cpp index ec01dc00b..a1291fe26 100644 --- a/modules/nickserv/ns_set.cpp +++ b/modules/nickserv/ns_set.cpp @@ -598,7 +598,8 @@ public: if (MOD_RESULT == EVENT_STOP) return; - if (!param.empty() && Config->GetModule("nickserv")->Get("confirmemailchanges") && !source.IsServicesOper()) + const auto nsmailreg = Config->GetModule("ns_register")->Get("registration").equals_ci("mail"); + if (!param.empty() && Config->GetModule("nickserv")->Get("confirmemailchanges", nsmailreg ? "yes" : "no") && !source.IsServicesOper()) { if (SendConfirmMail(source.GetUser(), source.GetAccount(), source.service, param)) {