1
0
mirror of https://github.com/anope/anope.git synced 2026-06-26 04:26: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 -5
View File
@@ -146,12 +146,12 @@ class DBSQL : public Module, public Pipe
this->imported = true;
}
void OnReload(ServerConfig *conf, ConfigReader &reader) anope_override
void OnReload(Configuration::Conf *conf) anope_override
{
Anope::string engine = reader.ReadValue("db_sql", "engine", "", 0);
this->sql = ServiceReference<Provider>("SQL::Provider", engine);
this->prefix = reader.ReadValue("db_sql", "prefix", "anope_db_", 0);
this->import = reader.ReadFlag("db_sql", "import", "false", 0);
Configuration::Block *block = conf->GetModule(this);
this->sql = ServiceReference<Provider>("SQL::Provider", block->Get<const Anope::string &>("engine"));
this->prefix = block->Get<const Anope::string &>("prefix", "anope_db_");
this->import = block->Get<bool>("import");
}
void OnShutdown() anope_override