diff options
author | Adam <Adam@anope.org> | 2013-04-11 00:08:28 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-04-11 00:08:28 -0500 |
commit | 4f9b7874d6b3a41939ecc2e872ec08d03af7b5f1 (patch) | |
tree | 43162205d31b277c9ff12ee28b7e3a60d6382316 /modules/extra/m_sql_oper.cpp | |
parent | 207c46c871e85b55ae66acc456c6bc412c0c79f9 (diff) |
Pass new config and the new config reader to the OnReload event, aswell as call it on module load on modules that hook to it
Diffstat (limited to 'modules/extra/m_sql_oper.cpp')
-rw-r--r-- | modules/extra/m_sql_oper.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/modules/extra/m_sql_oper.cpp b/modules/extra/m_sql_oper.cpp index bbcd108c4..4f982e1d8 100644 --- a/modules/extra/m_sql_oper.cpp +++ b/modules/extra/m_sql_oper.cpp @@ -99,16 +99,12 @@ class ModuleSQLOper : public Module Implementation i[] = { I_OnReload, I_OnNickIdentify }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); - - this->OnReload(); } - void OnReload() anope_override + void OnReload(ServerConfig *conf, ConfigReader &reader) anope_override { - ConfigReader config; - - this->engine = config.ReadValue("m_sql_oper", "engine", "", 0); - this->query = config.ReadValue("m_sql_oper", "query", "", 0); + this->engine = reader.ReadValue("m_sql_oper", "engine", "", 0); + this->query = reader.ReadValue("m_sql_oper", "query", "", 0); this->SQL = ServiceReference<SQL::Provider>("SQL::Provider", this->engine); } |