1
0
mirror of https://github.com/anope/anope.git synced 2026-07-02 10:06:38 +02:00

Pass new config and the new config reader to the OnReload event, aswell as call it on module load on modules that hook to it

This commit is contained in:
Adam
2013-04-11 00:08:28 -05:00
parent 207c46c871
commit 4f9b7874d6
45 changed files with 251 additions and 373 deletions
+4 -8
View File
@@ -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);
}