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:
+3
-5
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user