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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user