1
0
mirror of https://github.com/anope/anope.git synced 2026-07-06 04:53:13 +02:00

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

This commit is contained in:
Adam
2013-04-11 00:08:28 -05:00
parent 207c46c871
commit 4f9b7874d6
45 changed files with 251 additions and 373 deletions
+3 -5
View File
@@ -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;