summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/nickserv.example.conf7
-rw-r--r--language/anope.en_US.po23
-rw-r--r--modules/extra/ldap_authentication.cpp4
-rw-r--r--modules/nickserv/nickserv.cpp2
-rw-r--r--modules/nickserv/ns_register.cpp22
-rw-r--r--modules/nickserv/ns_set.cpp30
-rw-r--r--modules/webcpanel/pages/register.cpp3
-rw-r--r--modules/webcpanel/templates/default/register.html8
8 files changed, 12 insertions, 87 deletions
diff --git a/data/nickserv.example.conf b/data/nickserv.example.conf
index ddc9a8ca8..13af3b0bb 100644
--- a/data/nickserv.example.conf
+++ b/data/nickserv.example.conf
@@ -66,13 +66,6 @@ module
client = "NickServ"
/*
- * Force users to give an e-mail address when they register a nick.
- *
- * This directive defaults to "yes" and is recommended to be enabled. This is required if e-mail registration is enabled.
- */
- forceemail = yes
-
- /*
* Require users who change their email address to confirm they
* own their new email.
*/
diff --git a/language/anope.en_US.po b/language/anope.en_US.po
index 0e544a581..6651b8764 100644
--- a/language/anope.en_US.po
+++ b/language/anope.en_US.po
@@ -745,9 +745,6 @@ msgstr "passcode"
msgid "password"
msgstr "password"
-msgid "password [email]"
-msgstr "password [email]"
-
msgid "password email"
msgstr "password email"
@@ -3545,10 +3542,6 @@ msgid "E-mail address for %s changed to %s."
msgstr "E-mail address for %s changed to %s."
#, c-format
-msgid "E-mail address for %s unset."
-msgstr "E-mail address for %s unset."
-
-#, c-format
msgid "E-mail for %s is invalid."
msgstr "E-mail for %s is invalid."
@@ -7160,19 +7153,6 @@ msgstr ""
msgid "The STATS command prints out statistics about stored nicks and memory usage."
msgstr "The STATS command prints out statistics about stored nicks and memory usage."
-msgid ""
-"The email 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 SET HIDE it\n"
-"after registering if it isn't the default setting already."
-msgstr ""
-"The email 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 SET HIDE it\n"
-"after registering if it isn't the default setting already."
-
#, c-format
msgid ""
"The %s command allows users to configure logging settings\n"
@@ -8294,9 +8274,6 @@ msgstr "You cannot set your memo limit higher than %d."
msgid "You cannot unassign bots while persist is set on the channel."
msgstr "You cannot unassign bots while persist is set on the channel."
-msgid "You cannot unset the e-mail on this network."
-msgstr "You cannot unset the e-mail on this network."
-
msgid "You cannot use this command."
msgstr "You cannot use this command."
diff --git a/modules/extra/ldap_authentication.cpp b/modules/extra/ldap_authentication.cpp
index 3896bd1a2..4f4f4f1fc 100644
--- a/modules/extra/ldap_authentication.cpp
+++ b/modules/extra/ldap_authentication.cpp
@@ -227,10 +227,6 @@ public:
email_attribute = conf->Get<const Anope::string>("email_attribute");
this->disable_register_reason = conf->Get<const Anope::string>("disable_register_reason");
this->disable_email_reason = conf->Get<const Anope::string>("disable_email_reason");
-
- if (!email_attribute.empty())
- /* Don't complain to users about how they need to update their email, we will do it for them */
- config->GetModule("nickserv")->Set("forceemail", "false");
}
EventReturn OnPreCommand(CommandSource &source, Command *command, std::vector<Anope::string> &params) override
diff --git a/modules/nickserv/nickserv.cpp b/modules/nickserv/nickserv.cpp
index 47d2cf30d..499b84d32 100644
--- a/modules/nickserv/nickserv.cpp
+++ b/modules/nickserv/nickserv.cpp
@@ -357,7 +357,7 @@ public:
if (!modesonid.empty())
u->SetModes(NickServ, modesonid);
- if (block->Get<bool>("forceemail", "yes") && u->Account()->email.empty())
+ if (u->Account()->email.empty())
{
u->SendMessage(NickServ, _("You must now supply an e-mail for your nick.\n"
"This e-mail will allow you to retrieve your password in\n"
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"
diff --git a/modules/nickserv/ns_set.cpp b/modules/nickserv/ns_set.cpp
index 31547840b..b02c6e6ba 100644
--- a/modules/nickserv/ns_set.cpp
+++ b/modules/nickserv/ns_set.cpp
@@ -542,7 +542,7 @@ class CommandNSSetEmail
}
public:
- CommandNSSetEmail(Module *creator, const Anope::string &cname = "nickserv/set/email", size_t min = 0) : Command(creator, cname, min, min + 1)
+ CommandNSSetEmail(Module *creator, const Anope::string &cname = "nickserv/set/email", size_t min = 1) : Command(creator, cname, min, min + 1)
{
this->SetDesc(_("Associate an E-mail address with your nickname"));
this->SetSyntax(_("\037address\037"));
@@ -570,17 +570,12 @@ public:
return;
}
- if (param.empty() && Config->GetModule("nickserv")->Get<bool>("forceemail", "yes"))
- {
- source.Reply(_("You cannot unset the e-mail on this network."));
- return;
- }
else if (Config->GetModule("nickserv")->Get<bool>("secureadmins", "yes") && source.nc != nc && nc->IsServicesOper())
{
source.Reply(_("You may not change the e-mail of other Services Operators."));
return;
}
- else if (!param.empty() && !Mail::Validate(param))
+ else if (!Mail::Validate(param))
{
source.Reply(MAIL_X_INVALID, param.c_str());
return;
@@ -591,7 +586,7 @@ public:
if (MOD_RESULT == EVENT_STOP)
return;
- if (!param.empty() && Config->GetModule("nickserv")->Get<bool>("confirmemailchanges") && !source.IsServicesOper())
+ if (Config->GetModule("nickserv")->Get<bool>("confirmemailchanges") && !source.IsServicesOper())
{
if (SendConfirmMail(source.GetUser(), source.GetAccount(), source.service, param))
{
@@ -601,24 +596,15 @@ public:
}
else
{
- if (!param.empty())
- {
- Log(nc == source.GetAccount() ? LOG_COMMAND : LOG_ADMIN, source, this) << "to change the email of " << nc->display << " to " << param;
- nc->email = param;
- source.Reply(_("E-mail address for \002%s\002 changed to \002%s\002."), nc->display.c_str(), param.c_str());
- }
- else
- {
- Log(nc == source.GetAccount() ? LOG_COMMAND : LOG_ADMIN, source, this) << "to unset the email of " << nc->display;
- nc->email.clear();
- source.Reply(_("E-mail address for \002%s\002 unset."), nc->display.c_str());
- }
+ Log(nc == source.GetAccount() ? LOG_COMMAND : LOG_ADMIN, source, this) << "to change the email of " << nc->display << " to " << param;
+ nc->email = param;
+ source.Reply(_("E-mail address for \002%s\002 changed to \002%s\002."), nc->display.c_str(), param.c_str());
}
}
void Execute(CommandSource &source, const std::vector<Anope::string> &params) override
{
- this->Run(source, source.nc->display, params.size() ? params[0] : "");
+ this->Run(source, source.nc->display, params[0]);
}
bool OnHelp(CommandSource &source, const Anope::string &) override
@@ -644,7 +630,7 @@ public:
void Execute(CommandSource &source, const std::vector<Anope::string> &params) override
{
- this->Run(source, params[0], params.size() > 1 ? params[1] : "");
+ this->Run(source, params[0], params[1]);
}
bool OnHelp(CommandSource &source, const Anope::string &) override
diff --git a/modules/webcpanel/pages/register.cpp b/modules/webcpanel/pages/register.cpp
index 7d75ea28c..53ff64d99 100644
--- a/modules/webcpanel/pages/register.cpp
+++ b/modules/webcpanel/pages/register.cpp
@@ -13,9 +13,6 @@ bool WebCPanel::Register::OnRequest(HTTPProvider *server, const Anope::string &p
replacements["TITLE"] = page_title;
- if (Config->GetModule("nickserv")->Get<bool>("forceemail", "yes"))
- replacements["FORCE_EMAIL"] = "yes";
-
TemplateFileServer page("register.html");
page.Serve(server, page_name, client, message, reply, replacements);
diff --git a/modules/webcpanel/templates/default/register.html b/modules/webcpanel/templates/default/register.html
index e71d763f6..311b94cf5 100644
--- a/modules/webcpanel/templates/default/register.html
+++ b/modules/webcpanel/templates/default/register.html
@@ -34,16 +34,8 @@
style="margin-bottom: -1px; border-bottom-left-radius: 0; border-bottom-right-radius: 0;">
<input type="password" name="password" class="form-control" placeholder="Password" required="required"
style="margin-bottom: -1px; border-radius: 0;">
-
- {IF EXISTS FORCE_EMAIL}
<input type="email" name="email" class="form-control" placeholder="Email" required="required"
style="margin-bottom: 15px; border-top-left-radius: 0; border-top-right-radius: 0;">
- {ELSE}
- <h4>Optional</h4>
- <input type="email" name="email" class="form-control" placeholder="Email"
- style="margin-bottom: 15px;">
- {END IF}
-
<button class="btn btn-lg btn-warning btn-block" type="submit">Register</button>
</form>
</div>