From 5eb13f442058a9e87ed5396e93008dea46b784f2 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 15 Apr 2025 13:03:48 +0100 Subject: [PATCH] Use Anope::Template in db_json. --- modules/database/db_json.cpp | 9 ++++----- 1 file 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("module_database", "{name}.module.json") - .replace_all_cs("{name}", mod->name); + filename = Anope::Template(Config->GetModule(this).Get("module_database", "{name}.module.json"), { + { "name", mod->name }, + }); } else { // We are reading a the name of the core database. - filename = Config->GetModule(this) - .Get("database", "anope.json"); + filename = Config->GetModule(this).Get("database", "anope.json"); } return Anope::ExpandData(filename);