1
0
mirror of https://github.com/anope/anope.git synced 2026-06-28 08:56:38 +02:00

Bug #1368 - check all members of a users gruop against the access list

This commit is contained in:
Adam
2011-12-31 01:33:32 -05:00
parent f1b05acf26
commit 20aa4e85ce
6 changed files with 19 additions and 29 deletions
+16
View File
@@ -120,6 +120,22 @@ void ChanAccess::unserialize(serialized_data &data)
ci->AddAccess(access);
}
bool ChanAccess::Matches(User *u, NickCore *nc)
{
if (u && Anope::Match(u->nick, this->mask))
return true;
else if (u && Anope::Match(u->GetDisplayedMask(), this->mask))
return true;
else if (nc)
for (std::list<NickAlias *>::iterator it = nc->aliases.begin(); it != nc->aliases.end(); ++it)
{
NickAlias *na = *it;
if (Anope::Match(na->nick, this->mask))
return true;
}
return false;
}
bool ChanAccess::operator>(const ChanAccess &other) const
{
const std::vector<Privilege> &privs = PrivilegeManager::GetPrivileges();