diff options
Diffstat (limited to 'modules/extra/m_sql_authentication.cpp')
-rw-r--r-- | modules/extra/m_sql_authentication.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/modules/extra/m_sql_authentication.cpp b/modules/extra/m_sql_authentication.cpp index 7fcdf4e13..027b0bbcc 100644 --- a/modules/extra/m_sql_authentication.cpp +++ b/modules/extra/m_sql_authentication.cpp @@ -85,17 +85,13 @@ class ModuleSQLAuthentication : public Module Implementation i[] = { I_OnReload, I_OnPreCommand, I_OnCheckAuthentication }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); - - this->OnReload(); } - void OnReload() anope_override + void OnReload(ServerConfig *conf, ConfigReader &reader) anope_override { - ConfigReader config; - - this->engine = config.ReadValue("m_sql_authentication", "engine", "", 0); - this->query = config.ReadValue("m_sql_authentication", "query", "", 0); - this->disable_reason = config.ReadValue("m_sql_authentication", "disable_reason", "", 0); + this->engine = reader.ReadValue("m_sql_authentication", "engine", "", 0); + this->query = reader.ReadValue("m_sql_authentication", "query", "", 0); + this->disable_reason = reader.ReadValue("m_sql_authentication", "disable_reason", "", 0); this->SQL = ServiceReference<SQL::Provider>("SQL::Provider", this->engine); } |