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

Rework the config file reader to be much more flexible and move many configuration directives to the actual modules they are used in.

This commit is contained in:
Adam
2013-05-05 01:55:04 -04:00
parent 781defb707
commit 1d0bb9b26b
165 changed files with 3093 additions and 4861 deletions
+5 -3
View File
@@ -101,10 +101,12 @@ class ModuleSQLOper : public Module
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
}
void OnReload(ServerConfig *conf, ConfigReader &reader) anope_override
void OnReload(Configuration::Conf *conf) anope_override
{
this->engine = reader.ReadValue("m_sql_oper", "engine", "", 0);
this->query = reader.ReadValue("m_sql_oper", "query", "", 0);
Configuration::Block *config = conf->GetModule(this);
this->engine = config->Get<const Anope::string &>("engine");
this->query = config->Get<const Anope::string &>("query");
this->SQL = ServiceReference<SQL::Provider>("SQL::Provider", this->engine);
}