diff options
author | Adam <Adam@anope.org> | 2010-11-30 14:00:15 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-12-12 19:37:03 -0500 |
commit | c41c82857464c34c61e6f2cf1939cea866f7d49a (patch) | |
tree | 6d280171f4feb19012b06e9445f424ad6b0bc994 /src | |
parent | 5fe41fb8a056efd14ecdb1079813b23d83821193 (diff) |
Do not use wildcard matching when looking up hosts on access add/del
Diffstat (limited to 'src')
-rw-r--r-- | src/regchannel.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/regchannel.cpp b/src/regchannel.cpp index d5afbfbcf..e89bbee5c 100644 --- a/src/regchannel.cpp +++ b/src/regchannel.cpp @@ -278,14 +278,15 @@ ChanAccess *ChannelInfo::GetAccess(NickCore *nc, int16 level) * * @param u The mask to find within the access list vector * @param level Optional channel access level to compare the access entries to + * @param wildcard True to match using wildcards * @return A ChanAccess struct corresponding to the mask, or NULL if not found * * Retrieves an entry from the access list that matches the given mask, optionally also matching a certain level. */ -ChanAccess *ChannelInfo::GetAccess(const Anope::string &mask, int16 level) +ChanAccess *ChannelInfo::GetAccess(const Anope::string &mask, int16 level, bool wildcard) { for (unsigned i = 0, end = this->access.size(); i < end; ++i) - if (Anope::Match(this->access[i]->mask, mask)) + if (wildcard ? Anope::Match(this->access[i]->mask, mask) : this->access[i]->mask.equals_ci(mask)) return this->access[i]; return NULL; } |