summaryrefslogtreecommitdiff
path: root/modules/commands
diff options
context:
space:
mode:
Diffstat (limited to 'modules/commands')
-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)