From d24fb039172786e0fb3e3164140b337c85cdeeca Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 27 Feb 2014 04:49:28 -0500 Subject: Allow registration=mail forceemail=false to work, and simply give fully registered accounts to people who do not provide an email to nickserv/register --- modules/commands/ns_register.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'modules') diff --git a/modules/commands/ns_register.cpp b/modules/commands/ns_register.cpp index 47f47ffc5..c3d678cf1 100644 --- a/modules/commands/ns_register.cpp +++ b/modules/commands/ns_register.cpp @@ -130,12 +130,6 @@ class CommandNSRegister : public Command return; } - if (nsregister.equals_ci("mail") && email.empty()) - { - source.Reply(_("You must specify an email address.")); - return; - } - time_t nickregdelay = Config->GetModule(this->owner)->Get("nickregdelay"); time_t reg_delay = Config->GetModule("nickserv")->Get("regdelay"); if (u && !u->HasMode("OPER") && nickregdelay && Anope::CurTime - u->timestamp < nickregdelay) @@ -222,8 +216,11 @@ class CommandNSRegister : public Command } else if (nsregister.equals_ci("mail")) { - nc->Extend("UNCONFIRMED"); - SendRegmail(NULL, na, source.service); + if (!email.empty()) + { + nc->Extend("UNCONFIRMED"); + SendRegmail(NULL, na, source.service); + } } if (u) -- cgit