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:
@@ -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())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user