diff options
| author | 2021-04-06 20:06:18 +0100 | |
|---|---|---|
| committer | 2021-04-07 10:36:11 +0100 | |
| commit | 942fd2bcfd384a12c900999fe663202c87319a68 (patch) | |
| tree | c2bad1906af27afbc3c7d96c3e5ca3c27c83f090 /src/snomasks.cpp | |
| parent | Merge branch 'insp3' into master. (diff) | |
Switch simple iterator loops to use range-based for loops.
Diffstat (limited to 'src/snomasks.cpp')
| -rw-r--r-- | src/snomasks.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/snomasks.cpp b/src/snomasks.cpp index 296525534..45a180bc6 100644 --- a/src/snomasks.cpp +++ b/src/snomasks.cpp @@ -129,10 +129,8 @@ void Snomask::Send(char letter, const std::string& desc, const std::string& msg) const std::string finalmsg = InspIRCd::Format("*** %s: %s", desc.c_str(), msg.c_str()); /* Only opers can receive snotices, so we iterate the oper list */ - const UserManager::OperList& opers = ServerInstance->Users.all_opers; - for (UserManager::OperList::const_iterator i = opers.begin(); i != opers.end(); ++i) + for (const auto& user : ServerInstance->Users.all_opers) { - User* user = *i; // IsNoticeMaskSet() returns false for opers who aren't +s, no need to check for it separately if (IS_LOCAL(user) && user->IsNoticeMaskSet(letter)) user->WriteNotice(finalmsg); |
