1
0
mirror of https://github.com/anope/anope.git synced 2026-06-12 19:14:47 +02:00

Use Anope::Template in db_json.

This commit is contained in:
Sadie Powell
2025-04-15 13:03:48 +01:00
parent bd9d3b0f7d
commit 5eb13f4420
+4 -5
View File
@@ -155,15 +155,14 @@ private:
if (mod)
{
// We are reading the name of a module database.
filename = Config->GetModule(this)
.Get<Anope::string>("module_database", "{name}.module.json")
.replace_all_cs("{name}", mod->name);
filename = Anope::Template(Config->GetModule(this).Get<Anope::string>("module_database", "{name}.module.json"), {
{ "name", mod->name },
});
}
else
{
// We are reading a the name of the core database.
filename = Config->GetModule(this)
.Get<Anope::string>("database", "anope.json");
filename = Config->GetModule(this).Get<Anope::string>("database", "anope.json");
}
return Anope::ExpandData(filename);