From 1d0bb9b26b7ad58ab0bf979ac046f4511b3bf12b Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 5 May 2013 01:55:04 -0400 Subject: Rework the config file reader to be much more flexible and move many configuration directives to the actual modules they are used in. --- modules/database/db_sql.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'modules/database/db_sql.cpp') 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("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("SQL::Provider", block->Get("engine")); + this->prefix = block->Get("prefix", "anope_db_"); + this->import = block->Get("import"); } void OnShutdown() anope_override -- cgit