summaryrefslogtreecommitdiff
path: root/modules/commands/ns_register.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-02-27 04:49:28 -0500
committerAdam <Adam@anope.org>2014-02-27 04:49:28 -0500
commitd24fb039172786e0fb3e3164140b337c85cdeeca (patch)
treebae6bd9a1b35bfebb3c40c85416b32723d12ba20 /modules/commands/ns_register.cpp
parent5adc8bfefc126aff32a88219409ec9131229d86a (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.cpp13
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)