summaryrefslogtreecommitdiff
path: root/modules/extra/m_sql_authentication.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/extra/m_sql_authentication.cpp')
-rw-r--r--modules/extra/m_sql_authentication.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/extra/m_sql_authentication.cpp b/modules/extra/m_sql_authentication.cpp
index 823090884..2342ef89d 100644
--- a/modules/extra/m_sql_authentication.cpp
+++ b/modules/extra/m_sql_authentication.cpp
@@ -69,7 +69,7 @@ class ModuleSQLAuthentication : public Module
{
Anope::string engine;
Anope::string query;
- Anope::string disable_reason;
+ Anope::string disable_reason, disable_email_reason;
ServiceReference<SQL::Provider> SQL;
@@ -86,6 +86,7 @@ class ModuleSQLAuthentication : public Module
this->engine = config->Get<const Anope::string>("engine");
this->query = config->Get<const Anope::string>("query");
this->disable_reason = config->Get<const Anope::string>("disable_reason");
+ this->disable_email_reason = config->Get<Anope::string>("disable_email_reason");
this->SQL = ServiceReference<SQL::Provider>("SQL::Provider", this->engine);
}
@@ -98,6 +99,12 @@ class ModuleSQLAuthentication : public Module
return EVENT_STOP;
}
+ if (!this->disable_email_reason.empty() && command->name == "nickserv/set/email")
+ {
+ source.Reply(this->disable_email_reason);
+ return EVENT_STOP;
+ }
+
return EVENT_CONTINUE;
}