summaryrefslogtreecommitdiff
path: root/src/access.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-04-07 23:46:44 -0500
committerAdam <Adam@anope.org>2013-04-07 23:46:44 -0500
commitfb7fef7a849342ab8463743497e781c5c3e6ae88 (patch)
tree5d230a68b6eed70c7b4f718410dd62fea779654c /src/access.cpp
parent36602224b8b1a11326a224779d16bcb12f0ed532 (diff)
Optimizations of much of the more commonly used code
Diffstat (limited to 'src/access.cpp')
-rw-r--r--src/access.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/access.cpp b/src/access.cpp
index dd5881108..7a178b446 100644
--- a/src/access.cpp
+++ b/src/access.cpp
@@ -152,18 +152,18 @@ Serializable* ChanAccess::Unserialize(Serializable *obj, Serialize::Data &data)
return access;
}
-bool ChanAccess::Matches(const User *u, const NickCore *nc) const
+bool ChanAccess::Matches(const User *u, const NickCore *acc) const
{
bool is_mask = this->mask.find_first_of("!@?*") != Anope::string::npos;
if (u && is_mask && Anope::Match(u->nick, this->mask))
return true;
else if (u && Anope::Match(u->GetDisplayedMask(), this->mask))
return true;
- else if (nc)
- for (unsigned i = nc->aliases->size(); i > 0; --i)
+ else if (acc)
+ for (unsigned i = 0; i < acc->aliases->size(); ++i)
{
- const NickAlias *na = nc->aliases->at(i - 1);
- if (na && Anope::Match(na->nick, this->mask))
+ const NickAlias *na = acc->aliases->at(i);
+ if (Anope::Match(na->nick, this->mask))
return true;
}
return false;