summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2025-04-15 13:03:48 +0100
committerSadie Powell <sadie@witchery.services>2025-04-15 13:04:09 +0100
commit5eb13f442058a9e87ed5396e93008dea46b784f2 (patch)
tree5cd76a9fa5e0f399cb31ce7bba2031c01a75c33e /modules
parentbd9d3b0f7d83256f97940043693fd52a62c6198a (diff)
Use Anope::Template in db_json.
Diffstat (limited to 'modules')
-rw-r--r--modules/database/db_json.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/database/db_json.cpp b/modules/database/db_json.cpp
index e1523c31d..9796ea7f3 100644
--- a/modules/database/db_json.cpp
+++ b/modules/database/db_json.cpp
@@ -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);