diff options
author | Adam <Adam@anope.org> | 2013-04-11 00:08:28 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-04-11 00:08:28 -0500 |
commit | 4f9b7874d6b3a41939ecc2e872ec08d03af7b5f1 (patch) | |
tree | 43162205d31b277c9ff12ee28b7e3a60d6382316 /modules/database/db_flatfile.cpp | |
parent | 207c46c871e85b55ae66acc456c6bc412c0c79f9 (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 'modules/database/db_flatfile.cpp')
-rw-r--r-- | modules/database/db_flatfile.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/modules/database/db_flatfile.cpp b/modules/database/db_flatfile.cpp index 50a513c65..dcf4a5aa4 100644 --- a/modules/database/db_flatfile.cpp +++ b/modules/database/db_flatfile.cpp @@ -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 |