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