From df321a118e7dd44dcd3a389f8ee75e9ff915b55e Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 14 May 2014 19:10:23 -0400 Subject: Fix access lists showing the wrong mask if the display nick for a group expires but the group still exists. This can cause access entries for nicks to not be deleted whenever the nicks are deleted. --- modules/database/db_old.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/database') diff --git a/modules/database/db_old.cpp b/modules/database/db_old.cpp index b49a6c46e..b73afbc41 100644 --- a/modules/database/db_old.cpp +++ b/modules/database/db_old.cpp @@ -898,7 +898,7 @@ static void LoadChannels() Anope::string mask; READ(read_string(mask, f)); if (access) - access->mask = mask; + access->SetMask(mask, ci); READ(read_int32(&tmp32, f)); if (access) -- cgit From f627a3bacd0d058e94260dac1555790cafd9a926 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 21 May 2014 08:50:40 -0400 Subject: Core prep for p10 stuff --- modules/database/db_old.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/database') diff --git a/modules/database/db_old.cpp b/modules/database/db_old.cpp index b73afbc41..27b2e4fe9 100644 --- a/modules/database/db_old.cpp +++ b/modules/database/db_old.cpp @@ -719,7 +719,7 @@ static void LoadBots() READ(read_int32(&created, f)); READ(read_int16(&chancount, f)); - BotInfo *bi = BotInfo::Find(nick); + BotInfo *bi = BotInfo::Find(nick, true); if (!bi) bi = new BotInfo(nick, user, host, real); bi->created = created; @@ -975,7 +975,7 @@ static void LoadChannels() } READ(read_string(buffer, f)); - ci->bi = BotInfo::Find(buffer); + ci->bi = BotInfo::Find(buffer, true); READ(read_int32(&tmp32, f)); if (tmp32 & OLD_BS_DONTKICKOPS) -- cgit From 53acb731938051df6a9ced2ecfecb2aae98d5967 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 26 May 2014 21:38:35 -0400 Subject: Fix default db name in db_flatfifle in a couple places --- modules/database/db_flatfile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/database') diff --git a/modules/database/db_flatfile.cpp b/modules/database/db_flatfile.cpp index 694ff69a4..aa8f427ad 100644 --- a/modules/database/db_flatfile.cpp +++ b/modules/database/db_flatfile.cpp @@ -123,7 +123,7 @@ class DBFlatFile : public Module, public Pipe const std::vector &type_order = Serialize::Type::GetTypeOrder(); std::set dbs; - dbs.insert(Config->GetModule(this)->Get("database")); + dbs.insert(Config->GetModule(this)->Get("database", "anope.db")); for (unsigned i = 0; i < type_order.size(); ++i) { @@ -337,7 +337,7 @@ class DBFlatFile : public Module, public Pipe for (std::map::iterator it = databases.begin(), it_end = databases.end(); it != it_end; ++it) { std::fstream *f = it->second; - const Anope::string &db_name = Anope::DataDir + "/" + (it->first ? (it->first->name + ".db") : Config->GetModule(this)->Get("database")); + const Anope::string &db_name = Anope::DataDir + "/" + (it->first ? (it->first->name + ".db") : Config->GetModule(this)->Get("database", "anope.db")); if (!f->is_open() || !f->good()) { -- cgit From 4f7868b1250fa02be825a193970bfb08e32e5d96 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 15 Jun 2014 04:49:31 -0400 Subject: Log more when unable to backup databases in db_flatfile --- modules/database/db_flatfile.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'modules/database') diff --git a/modules/database/db_flatfile.cpp b/modules/database/db_flatfile.cpp index aa8f427ad..97c88a986 100644 --- a/modules/database/db_flatfile.cpp +++ b/modules/database/db_flatfile.cpp @@ -146,10 +146,14 @@ class DBFlatFile : public Module, public Pipe Log(LOG_DEBUG) << "db_flatfile: Attempting to rename " << *it << " to " << newname; if (rename(oldname.c_str(), newname.c_str())) { - Log(this) << "Unable to back up database " << *it << "!"; + Anope::string err = Anope::LastError(); + Log(this) << "Unable to back up database " << *it << " (" << err << ")!"; if (!Config->GetModule(this)->Get("nobackupok")) + { Anope::Quitting = true; + Anope::QuitReason = "Unable to back up database " + *it + " (" + err + ")"; + } continue; } -- cgit