summaryrefslogtreecommitdiff
path: root/modules/database
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-02-13 17:42:01 -0500
committerAdam <Adam@anope.org>2013-02-14 01:20:18 -0500
commit9e544a6443117861c3d6406e435043f1cf0f7099 (patch)
treee7449fb01e377576e8a09f386117d2c251de0596 /modules/database
parent225b7c38c127fbc6aac6724012f71c9483a4da77 (diff)
Store what channels have references to accounts in NickCore to prevent having to iterate over all channels and then all access entries when nicks expire or from nickserv/alist
Diffstat (limited to 'modules/database')
-rw-r--r--modules/database/db_old.cpp2
-rw-r--r--modules/database/db_plain.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/database/db_old.cpp b/modules/database/db_old.cpp
index ac453fdbe..e1fe8f69d 100644
--- a/modules/database/db_old.cpp
+++ b/modules/database/db_old.cpp
@@ -701,7 +701,7 @@ static void LoadChannels()
ci->SetFounder(NickCore::Find(buffer));
READ(read_string(buffer, f));
- ci->successor = NickCore::Find(buffer);
+ ci->SetSuccessor(NickCore::Find(buffer));
char pwbuf[32];
READ(read_buffer(pwbuf, f));
diff --git a/modules/database/db_plain.cpp b/modules/database/db_plain.cpp
index 1256a2012..99bdf947a 100644
--- a/modules/database/db_plain.cpp
+++ b/modules/database/db_plain.cpp
@@ -142,7 +142,7 @@ EventReturn OnDatabaseReadMetadata(ChannelInfo *ci, const Anope::string &key, co
else if (key.equals_ci("FOUNDER"))
ci->SetFounder(NickCore::Find(params[0]));
else if (key.equals_ci("SUCCESSOR"))
- ci->successor = NickCore::Find(params[0]);
+ ci->SetSuccessor(NickCore::Find(params[0]));
else if (key.equals_ci("LEVELS"))
{
for (unsigned j = 0, end = params.size(); j < end; j += 2)
@@ -764,8 +764,8 @@ class DBPlain : public Module
db_buffer << "MD MEMOMAX " << ci->memos.memomax << endl;
if (ci->GetFounder())
db_buffer << "MD FOUNDER " << ci->GetFounder()->display << endl;
- if (ci->successor)
- db_buffer << "MD SUCCESSOR " << ci->successor->display << endl;
+ if (ci->GetSuccessor())
+ db_buffer << "MD SUCCESSOR " << ci->GetSuccessor()->display << endl;
if (!ci->desc.empty())
db_buffer << "MD DESC :" << ci->desc << endl;
if (!ci->last_topic.empty())