From 20aa4e85ce11a5d286f027638c4af82251c2afb9 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 31 Dec 2011 01:33:32 -0500 Subject: Bug #1368 - check all members of a users gruop against the access list --- src/access.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src') diff --git a/src/access.cpp b/src/access.cpp index 26622e6d6..06f0d2ef6 100644 --- a/src/access.cpp +++ b/src/access.cpp @@ -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::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 &privs = PrivilegeManager::GetPrivileges(); -- cgit