diff options
author | Adam <Adam@anope.org> | 2013-05-05 01:55:04 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-05-05 01:55:04 -0400 |
commit | 1d0bb9b26b7ad58ab0bf979ac046f4511b3bf12b (patch) | |
tree | 4486f0784bdf050fd7eb225c0cb9df352ce1f45a /modules/database/db_sql.cpp | |
parent | 781defb7076ddfddf723ca08cd0a518b6657b64f (diff) |
Rework the config file reader to be much more flexible and move many configuration directives to the actual modules they are used in.
Diffstat (limited to 'modules/database/db_sql.cpp')
-rw-r--r-- | modules/database/db_sql.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/database/db_sql.cpp b/modules/database/db_sql.cpp index 894037026..400619159 100644 --- a/modules/database/db_sql.cpp +++ b/modules/database/db_sql.cpp @@ -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 |