diff options
author | Adam <Adam@anope.org> | 2011-08-16 15:28:21 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-08-16 15:28:21 -0400 |
commit | 9aa414b1f63196d88731a5fc5adbc56be2c6fb39 (patch) | |
tree | e8f82c579a57e4ea400d0c89ceed994a1a8bea89 | |
parent | 2d9ddb065ff53fc853d16040ddeb36215a9a6186 (diff) |
Fixed matching acount access entries against nicknames
-rw-r--r-- | modules/commands/cs_access.cpp | 2 | ||||
-rw-r--r-- | modules/commands/cs_flags.cpp | 2 | ||||
-rw-r--r-- | modules/commands/cs_xop.cpp | 2 | ||||
-rw-r--r-- | src/regchannel.cpp | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/modules/commands/cs_access.cpp b/modules/commands/cs_access.cpp index 7ec65328a..d03f165f8 100644 --- a/modules/commands/cs_access.cpp +++ b/modules/commands/cs_access.cpp @@ -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; diff --git a/modules/commands/cs_flags.cpp b/modules/commands/cs_flags.cpp index cc88c330d..a8d44aeea 100644 --- a/modules/commands/cs_flags.cpp +++ b/modules/commands/cs_flags.cpp @@ -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; diff --git a/modules/commands/cs_xop.cpp b/modules/commands/cs_xop.cpp index a6107be3c..365b19e7c 100644 --- a/modules/commands/cs_xop.cpp +++ b/modules/commands/cs_xop.cpp @@ -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; diff --git a/src/regchannel.cpp b/src/regchannel.cpp index fffb384ac..ed25ce6bf 100644 --- a/src/regchannel.cpp +++ b/src/regchannel.cpp @@ -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)) |