From b65fd34a39e7b1f2cd355f999dad758b391b00e3 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 12 Nov 2013 20:12:56 -0500 Subject: [PATCH] Set the default db name to anope.db --- modules/database/db_flatfile.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/database/db_flatfile.cpp b/modules/database/db_flatfile.cpp index e7ea2f262..9c40c88f4 100644 --- a/modules/database/db_flatfile.cpp +++ b/modules/database/db_flatfile.cpp @@ -191,7 +191,7 @@ class DBFlatFile : public Module, public Pipe const std::vector &type_order = Serialize::Type::GetTypeOrder(); std::set tried_dbs; - const Anope::string &db_name = Anope::DataDir + "/" + Config->GetModule(this)->Get("database"); + const Anope::string &db_name = Anope::DataDir + "/" + Config->GetModule(this)->Get("database", "anope.db"); std::fstream fd(db_name.c_str(), std::ios_base::in); if (!fd.is_open()) @@ -268,7 +268,7 @@ class DBFlatFile : public Module, public Pipe if (s_type->GetOwner()) db_name = Anope::DataDir + "/module_" + s_type->GetOwner()->name + ".db"; else - db_name = Anope::DataDir + "/" + Config->GetModule(this)->Get("database"); + db_name = Anope::DataDir + "/" + Config->GetModule(this)->Get("database", "anope.db"); if (Anope::IsFile(db_name)) rename(db_name.c_str(), (db_name + ".tmp").c_str()); @@ -343,7 +343,7 @@ class DBFlatFile : public Module, public Pipe if (stype->GetOwner()) db_name = Anope::DataDir + "/module_" + stype->GetOwner()->name + ".db"; else - db_name = Anope::DataDir + "/" + Config->GetModule(this)->Get("database"); + db_name = Anope::DataDir + "/" + Config->GetModule(this)->Get("database", "anope.db"); std::fstream fd(db_name.c_str(), std::ios_base::in); if (!fd.is_open())