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

Set the default db name to anope.db

This commit is contained in:
Adam
2013-11-12 20:12:56 -05:00
parent c9f4c2db1f
commit b65fd34a39
+3 -3
View File
@@ -191,7 +191,7 @@ class DBFlatFile : public Module, public Pipe
const std::vector<Anope::string> &type_order = Serialize::Type::GetTypeOrder();
std::set<Anope::string> tried_dbs;
const Anope::string &db_name = Anope::DataDir + "/" + Config->GetModule(this)->Get<const Anope::string>("database");
const Anope::string &db_name = Anope::DataDir + "/" + Config->GetModule(this)->Get<const Anope::string>("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<const Anope::string>("database");
db_name = Anope::DataDir + "/" + Config->GetModule(this)->Get<const Anope::string>("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<const Anope::string>("database");
db_name = Anope::DataDir + "/" + Config->GetModule(this)->Get<const Anope::string>("database", "anope.db");
std::fstream fd(db_name.c_str(), std::ios_base::in);
if (!fd.is_open())