summaryrefslogtreecommitdiff
path: root/modules/database/db_flatfile.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-11-12 20:12:56 -0500
committerAdam <Adam@anope.org>2013-11-12 20:12:56 -0500
commitb65fd34a39e7b1f2cd355f999dad758b391b00e3 (patch)
tree9646328c8495ddc6ca333672de2a4eca39e0fecd /modules/database/db_flatfile.cpp
parentc9f4c2db1f90cc16bb23ac176cf4a6dbaa621696 (diff)
Set the default db name to anope.db
Diffstat (limited to 'modules/database/db_flatfile.cpp')
-rw-r--r--modules/database/db_flatfile.cpp6
1 files 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<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())