1
0
mirror of https://github.com/anope/anope.git synced 2026-07-03 19:23:14 +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
+3 -7
View File
@@ -99,16 +99,12 @@ class ModuleSQLOper : public Module
Implementation i[] = { I_OnReload, I_OnNickIdentify };
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_oper", "engine", "", 0);
this->query = config.ReadValue("m_sql_oper", "query", "", 0);
this->engine = reader.ReadValue("m_sql_oper", "engine", "", 0);
this->query = reader.ReadValue("m_sql_oper", "query", "", 0);
this->SQL = ServiceReference<SQL::Provider>("SQL::Provider", this->engine);
}