mirror of
https://github.com/anope/anope.git
synced 2026-07-05 05:53:13 +02:00
Start migrating to range-based for loops.
This commit is contained in:
+4
-2
@@ -113,9 +113,11 @@ void MemoInfo::Del(unsigned index)
|
||||
|
||||
bool MemoInfo::HasIgnore(User *u)
|
||||
{
|
||||
for (unsigned i = 0; i < this->ignores.size(); ++i)
|
||||
if (u->nick.equals_ci(this->ignores[i]) || (u->Account() && u->Account()->display.equals_ci(this->ignores[i])) || Anope::Match(u->GetMask(), Anope::string(this->ignores[i])))
|
||||
for (const auto &ignore : this->ignores)
|
||||
{
|
||||
if (u->nick.equals_ci(ignore) || (u->Account() && u->Account()->display.equals_ci(ignore)) || Anope::Match(u->GetMask(), Anope::string(ignore)))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user