summaryrefslogtreecommitdiff
path: root/modules/extra/m_sql_oper.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-04-11 00:08:28 -0500
committerAdam <Adam@anope.org>2013-04-11 00:08:28 -0500
commit4f9b7874d6b3a41939ecc2e872ec08d03af7b5f1 (patch)
tree43162205d31b277c9ff12ee28b7e3a60d6382316 /modules/extra/m_sql_oper.cpp
parent207c46c871e85b55ae66acc456c6bc412c0c79f9 (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.cpp10
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);
}