summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/modules.example.conf16
-rw-r--r--modules/extra/m_sql_authentication.cpp4
2 files changed, 4 insertions, 16 deletions
diff --git a/data/modules.example.conf b/data/modules.example.conf
index 8d1ba902b..ef862221f 100644
--- a/data/modules.example.conf
+++ b/data/modules.example.conf
@@ -220,7 +220,7 @@ m_ldap_authentication
/*
* The object class used by LDAP to store user account information.
- * Used for adding new users to LDAP if disable_ns_register is false.
+ * This is used for adding new users to LDAP if registration is allowed.
*/
object_class = "anopeUser"
@@ -242,11 +242,6 @@ m_ldap_authentication
password_attribute = "userPassword"
/*
- * Enable this to have this module disable "/msg NickServ REGISTER".
- */
- disable_ns_register = false
-
- /*
* If set, the reason to give the users who try to "/msg NickServ REGISTER".
* If not set, then registration is not blocked.
*/
@@ -439,13 +434,8 @@ m_sql_authentication
query = "SELECT `email_addr` AS `email` FROM `my_users` WHERE `username` = @a@ AND `password` = MD5(CONCAT('salt', @p@))"
/*
- * Enable this to have this module disable "/msg NickServ REGISTER".
- */
- disable_ns_register = false
-
- /*
- * The reason to give the users who try to "/msg NickServ REGISTER" if
- * disable_ns_register is enabled.
+ * If set, the reason to give the users who try to "/msg NickServ REGISTER".
+ * If not set, then registration is not blocked.
*/
#disable_reason = "To register on this network visit http://some.misconfigured.site/register"
}
diff --git a/modules/extra/m_sql_authentication.cpp b/modules/extra/m_sql_authentication.cpp
index e1afbc923..abdd745a5 100644
--- a/modules/extra/m_sql_authentication.cpp
+++ b/modules/extra/m_sql_authentication.cpp
@@ -73,7 +73,6 @@ class ModuleSQLAuthentication : public Module
{
Anope::string engine;
Anope::string query;
- bool disable_register;
Anope::string disable_reason;
ServiceReference<SQL::Provider> SQL;
@@ -97,7 +96,6 @@ class ModuleSQLAuthentication : public Module
this->engine = config.ReadValue("m_sql_authentication", "engine", "", 0);
this->query = config.ReadValue("m_sql_authentication", "query", "", 0);
- this->disable_register = config.ReadFlag("m_sql_authentication", "disable_ns_register", "false", 0);
this->disable_reason = config.ReadValue("m_sql_authentication", "disable_reason", "", 0);
this->SQL = ServiceReference<SQL::Provider>("SQL::Provider", this->engine);
@@ -105,7 +103,7 @@ class ModuleSQLAuthentication : public Module
EventReturn OnPreCommand(CommandSource &source, Command *command, std::vector<Anope::string> &params) anope_override
{
- if (this->disable_register && !this->disable_reason.empty() && command->name == "nickserv/register")
+ if (!this->disable_reason.empty() && command->name == "nickserv/register")
{
source.Reply(this->disable_reason);
return EVENT_STOP;