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/extra/m_sql_oper.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/extra/m_sql_oper.cpp')
-rw-r--r-- | modules/extra/m_sql_oper.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/extra/m_sql_oper.cpp b/modules/extra/m_sql_oper.cpp index 4f982e1d8..480bcf5a0 100644 --- a/modules/extra/m_sql_oper.cpp +++ b/modules/extra/m_sql_oper.cpp @@ -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); } |