mirror of
https://github.com/anope/anope.git
synced 2026-07-03 00:43:12 +02:00
Fixed matching acount access entries against nicknames
This commit is contained in:
@@ -83,7 +83,7 @@ class AccessChanAccess : public ChanAccess
|
||||
|
||||
bool Matches(User *u, NickCore *nc)
|
||||
{
|
||||
if (u && (Anope::Match(u->nick, this->mask) || Anope::Match(u->GetMask(), this->mask)))
|
||||
if (u && this->mask.find_first_of("!@?*") != Anope::string::npos && (Anope::Match(u->nick, this->mask) || Anope::Match(u->GetMask(), this->mask)))
|
||||
return true;
|
||||
else if (nc && Anope::Match(nc->display, this->mask))
|
||||
return true;
|
||||
|
||||
@@ -70,7 +70,7 @@ class FlagsChanAccess : public ChanAccess
|
||||
|
||||
bool Matches(User *u, NickCore *nc)
|
||||
{
|
||||
if (u && (Anope::Match(u->nick, this->mask) || Anope::Match(u->GetMask(), this->mask)))
|
||||
if (u && this->mask.find_first_of("!@?*") != Anope::string::npos && (Anope::Match(u->nick, this->mask) || Anope::Match(u->GetMask(), this->mask)))
|
||||
return true;
|
||||
else if (nc && Anope::Match(nc->display, this->mask))
|
||||
return true;
|
||||
|
||||
@@ -101,7 +101,7 @@ class XOPChanAccess : public ChanAccess
|
||||
|
||||
bool Matches(User *u, NickCore *nc)
|
||||
{
|
||||
if (u && (Anope::Match(u->nick, this->mask) || Anope::Match(u->GetMask(), this->mask)))
|
||||
if (u && this->mask.find_first_of("!@?*") != Anope::string::npos && (Anope::Match(u->nick, this->mask) || Anope::Match(u->GetMask(), this->mask)))
|
||||
return true;
|
||||
else if (nc && Anope::Match(nc->display, this->mask))
|
||||
return true;
|
||||
|
||||
+1
-1
@@ -220,7 +220,7 @@ AccessGroup ChannelInfo::AccessFor(User *u)
|
||||
group.SuperAdmin = u->SuperAdmin;
|
||||
group.Founder = IsFounder(u, this);
|
||||
group.ci = this;
|
||||
group.nc = u->Account();
|
||||
group.nc = nc;
|
||||
|
||||
for (unsigned i = 0, end = this->access.size(); i < end; ++i)
|
||||
if (this->access[i]->Matches(u, nc))
|
||||
|
||||
Reference in New Issue
Block a user