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/ns_maxemail.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/ns_maxemail.cpp')
-rw-r--r-- | modules/ns_maxemail.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/modules/ns_maxemail.cpp b/modules/ns_maxemail.cpp index bf90374d0..530ca5fe4 100644 --- a/modules/ns_maxemail.cpp +++ b/modules/ns_maxemail.cpp @@ -56,15 +56,11 @@ class NSMaxEmail : public Module Implementation i[] = { I_OnReload, I_OnPreCommand }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); - - OnReload(); } - void OnReload() anope_override + void OnReload(ServerConfig *conf, ConfigReader &reader) anope_override { - ConfigReader config; - this->NSEmailMax = config.ReadInteger("ns_maxemail", "maxemails", "0", 0, false); - Log(LOG_DEBUG) << "[ns_maxemail] NSEmailMax set to " << NSEmailMax; + this->NSEmailMax = reader.ReadInteger("ns_maxemail", "maxemails", "0", 0, false); } EventReturn OnPreCommand(CommandSource &source, Command *command, std::vector<Anope::string> ¶ms) anope_override |