summaryrefslogtreecommitdiff
path: root/modules/nickserv/ns_register.cpp
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2024-03-07 21:40:52 +0000
committerSadie Powell <sadie@witchery.services>2024-03-07 22:25:32 +0000
commit3272c1bbc65eaa29ba63e176ec76702c5b21d367 (patch)
tree9dda1773c1e7554787cce21794dbb4249ea51dd3 /modules/nickserv/ns_register.cpp
parent307ffea9517fa2b05fa04e7e89b0d4435191bf4f (diff)
Require new accounts to have email addresses.
Diffstat (limited to 'modules/nickserv/ns_register.cpp')
-rw-r--r--modules/nickserv/ns_register.cpp22
1 files changed, 3 insertions, 19 deletions
diff --git a/modules/nickserv/ns_register.cpp b/modules/nickserv/ns_register.cpp
index d73d74c6b..f29756eca 100644
--- a/modules/nickserv/ns_register.cpp
+++ b/modules/nickserv/ns_register.cpp
@@ -119,13 +119,10 @@ class CommandNSRegister final
: public Command
{
public:
- CommandNSRegister(Module *creator) : Command(creator, "nickserv/register", 1, 2)
+ CommandNSRegister(Module *creator) : Command(creator, "nickserv/register", 2, 2)
{
this->SetDesc(_("Register a nickname"));
- if (Config->GetModule("nickserv")->Get<bool>("forceemail", "yes"))
- this->SetSyntax(_("\037password\037 \037email\037"));
- else
- this->SetSyntax(_("\037password\037 \037[email]\037"));
+ this->SetSyntax(_("\037password\037 \037email\037"));
this->AllowUnregistered(true);
}
@@ -197,10 +194,7 @@ public:
unsigned int minpasslen = Config->GetModule("nickserv")->Get<unsigned>("minpasslen", "10");
unsigned int maxpasslen = Config->GetModule("nickserv")->Get<unsigned>("maxpasslen", "50");
-
- if (Config->GetModule("nickserv")->Get<bool>("forceemail", "yes") && email.empty())
- this->OnSyntaxError(source, "");
- else if (u && Anope::CurTime < u->lastnickreg + reg_delay)
+ if (u && Anope::CurTime < u->lastnickreg + reg_delay)
{
source.Reply(_("Please wait %lu seconds before using the REGISTER command again."),
(unsigned long)(u->lastnickreg + reg_delay) - Anope::CurTime);
@@ -290,16 +284,6 @@ public:
source.service->nick.c_str(), source.service->nick.c_str(),
minpasslen);
- if (!Config->GetModule("nickserv")->Get<bool>("forceemail", "yes"))
- {
- source.Reply(" ");
- source.Reply(_("The \037email\037 parameter is optional and will set the email\n"
- "for your nick immediately.\n"
- "Your privacy is respected; this e-mail won't be given to\n"
- "any third-party person. You may also wish to \002SET HIDE\002 it\n"
- "after registering if it isn't the default setting already."));
- }
-
source.Reply(" ");
source.Reply(_("This command also creates a new group for your nickname,\n"
"that will allow you to register other nicks later sharing\n"