diff options
author | Adam <Adam@anope.org> | 2013-02-13 17:42:01 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-02-14 01:20:18 -0500 |
commit | 9e544a6443117861c3d6406e435043f1cf0f7099 (patch) | |
tree | e7449fb01e377576e8a09f386117d2c251de0596 /src/access.cpp | |
parent | 225b7c38c127fbc6aac6724012f71c9483a4da77 (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 'src/access.cpp')
-rw-r--r-- | src/access.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/access.cpp b/src/access.cpp index fdaada75b..dd5881108 100644 --- a/src/access.cpp +++ b/src/access.cpp @@ -102,6 +102,10 @@ ChanAccess::~ChanAccess() std::vector<ChanAccess *>::iterator it = std::find(this->ci->access->begin(), this->ci->access->end(), this); if (it != this->ci->access->end()) this->ci->access->erase(it); + + const NickAlias *na = NickAlias::Find(this->mask); + if (na != NULL) + na->nc->RemoveChannelReference(this->ci); } } |