1
0
mirror of https://github.com/anope/anope.git synced 2026-06-28 09:46:38 +02:00

Add an option to not preserve old data in db_json.

This commit is contained in:
Sadie Powell
2025-11-10 17:16:21 +00:00
parent 88785bfdef
commit 1ce39c8e76
2 changed files with 16 additions and 0 deletions
+4
View File
@@ -363,6 +363,10 @@ public:
void OnSaveDatabase() override
{
// Step 0: clear the old data if we don't want to preserve it.
if (!Config->GetModule(this).Get<bool>("preserve_unknown_data", "yes"))
databases.clear();
// Step 1: clear the old data.
for (const auto &type : Serialize::Type::GetTypeOrder())
{