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