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:
+7
-2
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user