1
0
mirror of https://github.com/anope/anope.git synced 2026-07-07 12:23:13 +02:00

Hopefully sort this AccessGroup::HasPriv once and for all

This commit is contained in:
Adam
2011-08-09 00:06:44 -04:00
parent b7542fd6f2
commit 91c3363c15
4 changed files with 30 additions and 24 deletions
+7 -2
View File
@@ -258,12 +258,14 @@ AccessGroup ChannelInfo::AccessFor(User *u)
AccessGroup group;
group.SuperAdmin = u->SuperAdmin;
group.Founder = IsFounder(u, this);
group.ci = this;
for (unsigned i = 0, end = this->access.size(); i < end; ++i)
if (this->access[i]->Matches(u, nc))
group.push_back(this->access[i]);
group.SuperAdmin = u->SuperAdmin;
return group;
}
@@ -271,6 +273,9 @@ AccessGroup ChannelInfo::AccessFor(NickCore *nc)
{
AccessGroup group;
group.Founder = (this->founder && this->founder == nc);
group.ci = this;
for (unsigned i = 0, end = this->access.size(); i < end; ++i)
if (this->access[i]->Matches(NULL, nc))
group.push_back(this->access[i]);