From c41c82857464c34c61e6f2cf1939cea866f7d49a Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 30 Nov 2010 14:00:15 -0500 Subject: Do not use wildcard matching when looking up hosts on access add/del --- src/regchannel.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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; } -- cgit