mirror of
https://github.com/anope/anope.git
synced 2026-07-03 21:23: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:
@@ -169,8 +169,6 @@ class DBFlatFile : public Module, public Pipe
|
||||
|
||||
Implementation i[] = { I_OnReload, I_OnLoadDatabase, I_OnSaveDatabase, I_OnSerializeTypeCreate };
|
||||
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
|
||||
|
||||
OnReload();
|
||||
}
|
||||
|
||||
void OnNotify() anope_override
|
||||
@@ -193,11 +191,10 @@ class DBFlatFile : public Module, public Pipe
|
||||
Anope::Quitting = true;
|
||||
}
|
||||
|
||||
void OnReload() anope_override
|
||||
void OnReload(ServerConfig *conf, ConfigReader &reader) anope_override
|
||||
{
|
||||
ConfigReader config;
|
||||
database_file = config.ReadValue("db_flatfile", "database", "anope.db", 0);
|
||||
use_fork = config.ReadFlag("db_flatfile", "fork", "no", 0);
|
||||
database_file = reader.ReadValue("db_flatfile", "database", "anope.db", 0);
|
||||
use_fork = reader.ReadFlag("db_flatfile", "fork", "no", 0);
|
||||
}
|
||||
|
||||
EventReturn OnLoadDatabase() anope_override
|
||||
|
||||
Reference in New Issue
Block a user