diff options
Diffstat (limited to 'src/messages.cpp')
-rw-r--r-- | src/messages.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/messages.cpp b/src/messages.cpp index 701df60a1..2aaae177f 100644 --- a/src/messages.cpp +++ b/src/messages.cpp @@ -43,8 +43,10 @@ void Capab::Run(MessageSource &source, const std::vector<Anope::string> ¶ms, Servers::Capab.insert(token); } else - for (unsigned i = 0; i < params.size(); ++i) - Servers::Capab.insert(params[i]); + { + for (const auto ¶m : params) + Servers::Capab.insert(param); + } } void Error::Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) @@ -127,10 +129,8 @@ void Join::SJoin(MessageSource &source, const Anope::string &chan, time_t ts, co */ c->SetModesInternal(source, modes, ts, !c->syncing); - for (std::list<SJoinUser>::const_iterator it = users.begin(), it_end = users.end(); it != it_end; ++it) + for (const auto &[status, u] : users) { - const ChannelStatus &status = it->first; - User *u = it->second; keep_their_modes = ts <= c->creation_time; // OnJoinChannel can call modules which can modify this channel's ts if (c->FindUser(u)) @@ -426,10 +426,8 @@ void Stats::Run(MessageSource &source, const std::vector<Anope::string> ¶ms, IRCD->SendNumeric(219, source.GetSource(), "%c :End of /STATS report.", params[0][0]); else { - for (unsigned i = 0; i < Oper::opers.size(); ++i) + for (auto *o : Oper::opers) { - Oper *o = Oper::opers[i]; - const NickAlias *na = NickAlias::Find(o->name); if (na) IRCD->SendNumeric(243, source.GetSource(), "O * * %s %s 0", o->name.c_str(), o->ot->GetName().replace_all_cs(" ", "_").c_str()); |