diff options
author | Adam <Adam@anope.org> | 2014-02-27 04:49:28 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2014-02-27 04:49:28 -0500 |
commit | d24fb039172786e0fb3e3164140b337c85cdeeca (patch) | |
tree | bae6bd9a1b35bfebb3c40c85416b32723d12ba20 /modules/commands/ns_register.cpp | |
parent | 5adc8bfefc126aff32a88219409ec9131229d86a (diff) |
Allow registration=mail forceemail=false to work, and simply give fully registered accounts to people who do not provide an email to nickserv/register
Diffstat (limited to 'modules/commands/ns_register.cpp')
-rw-r--r-- | modules/commands/ns_register.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
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<time_t>("nickregdelay"); time_t reg_delay = Config->GetModule("nickserv")->Get<time_t>("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<bool>("UNCONFIRMED"); - SendRegmail(NULL, na, source.service); + if (!email.empty()) + { + nc->Extend<bool>("UNCONFIRMED"); + SendRegmail(NULL, na, source.service); + } } if (u) |