From d64855b35b27cc474ce03bcc5809fcf0cd8e11cf Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 4 Jan 2014 13:44:47 -0500 Subject: Allow m_sql_authentication to disable email changing similar to m_ldap_authentication --- modules/extra/m_sql_authentication.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'modules/extra/m_sql_authentication.cpp') 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; @@ -86,6 +86,7 @@ class ModuleSQLAuthentication : public Module this->engine = config->Get("engine"); this->query = config->Get("query"); this->disable_reason = config->Get("disable_reason"); + this->disable_email_reason = config->Get("disable_email_reason"); this->SQL = ServiceReference("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; } -- cgit