From 4f9b7874d6b3a41939ecc2e872ec08d03af7b5f1 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 11 Apr 2013 00:08:28 -0500 Subject: 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 --- modules/commands/cs_entrymsg.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'modules/commands/cs_entrymsg.cpp') diff --git a/modules/commands/cs_entrymsg.cpp b/modules/commands/cs_entrymsg.cpp index bb82e9b24..961cf1895 100644 --- a/modules/commands/cs_entrymsg.cpp +++ b/modules/commands/cs_entrymsg.cpp @@ -278,8 +278,6 @@ class CSEntryMessage : public Module Implementation i[] = { I_OnReload, I_OnJoinChannel }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); - - this->OnReload(); } void OnJoinChannel(User *u, Channel *c) anope_override @@ -294,10 +292,9 @@ class CSEntryMessage : public Module } } - void OnReload() anope_override + void OnReload(ServerConfig *conf, ConfigReader &reader) anope_override { - ConfigReader config; - MaxEntries = config.ReadInteger("cs_entrymsg", "maxentries", "5", 0, true); + MaxEntries = reader.ReadInteger("cs_entrymsg", "maxentries", "5", 0, true); } }; -- cgit