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_chanstats.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_chanstats.cpp')
| -rw-r--r-- | modules/extra/m_chanstats.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/modules/extra/m_chanstats.cpp b/modules/extra/m_chanstats.cpp index d62befbb0..caa20aacb 100644 --- a/modules/extra/m_chanstats.cpp +++ b/modules/extra/m_chanstats.cpp @@ -347,18 +347,16 @@ class MChanstats : public Module I_OnChanDrop, I_OnReload}; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); - this->OnReload(); } - void OnReload() anope_override + void OnReload(ServerConfig *conf, ConfigReader &reader) anope_override { - ConfigReader config; - prefix = config.ReadValue("chanstats", "prefix", "anope_", 0); - SmileysHappy = config.ReadValue("chanstats", "SmileysHappy", ":) :-) ;) :D :-D", 0); - SmileysSad = config.ReadValue("chanstats", "SmileysSad", ":( :-( ;( ;-(", 0); - SmileysOther = config.ReadValue("chanstats", "SmileysOther", ":/", 0); + prefix = reader.ReadValue("chanstats", "prefix", "anope_", 0); + SmileysHappy = reader.ReadValue("chanstats", "SmileysHappy", ":) :-) ;) :D :-D", 0); + SmileysSad = reader.ReadValue("chanstats", "SmileysSad", ":( :-( ;( ;-(", 0); + SmileysOther = reader.ReadValue("chanstats", "SmileysOther", ":/", 0); - Anope::string engine = config.ReadValue("chanstats", "engine", "", 0); + Anope::string engine = reader.ReadValue("chanstats", "engine", "", 0); this->sql = ServiceReference<SQL::Provider>("SQL::Provider", engine); if (sql) this->CheckTables(); |
