summaryrefslogtreecommitdiff
path: root/src/init.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 /src/init.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 'src/init.cpp')
-rw-r--r--src/init.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 96686589a..b0812fedc 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -118,16 +118,14 @@ void Anope::HandleSignal()
{
Anope::SaveDatabases();
- ServerConfig *old_config = Config;
try
{
- Config = new ServerConfig();
- FOREACH_MOD(I_OnReload, OnReload());
- delete old_config;
+ ServerConfig *new_config = new ServerConfig();
+ delete Config;
+ Config = new_config;
}
catch (const ConfigException &ex)
{
- Config = old_config;
Log() << "Error reloading configuration file: " << ex.GetReason();
}
break;