diff options
| author | 2020-11-11 02:25:06 +0000 | |
|---|---|---|
| committer | 2020-11-11 02:29:36 +0000 | |
| commit | 2d6d47b489d733ca3c29fc2f963d424029fcb929 (patch) | |
| tree | fa38bdd2dcbebdb126d29482bfb7d5389a10c2d4 /src/modules/m_customtitle.cpp | |
| parent | Convert FOREACH_MOD_CUSTOM to a variadic function. (diff) | |
Add stdalgo::equal_range and switch more stuff to iterator_range.
Diffstat (limited to 'src/modules/m_customtitle.cpp')
| -rw-r--r-- | src/modules/m_customtitle.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/modules/m_customtitle.cpp b/src/modules/m_customtitle.cpp index 6dca396ac..d98ded7b7 100644 --- a/src/modules/m_customtitle.cpp +++ b/src/modules/m_customtitle.cpp @@ -66,7 +66,6 @@ struct CustomTitle }; typedef std::multimap<std::string, CustomTitle> CustomVhostMap; -typedef std::pair<CustomVhostMap::iterator, CustomVhostMap::iterator> MatchingConfigs; /** Handle /TITLE */ @@ -85,11 +84,8 @@ class CommandTitle : public Command CmdResult Handle(User* user, const Params& parameters) override { - MatchingConfigs matching = configs.equal_range(parameters[0]); - - for (MatchingConfigs::first_type i = matching.first; i != matching.second; ++i) + for (const auto& [_, config] : stdalgo::equal_range(configs, parameters[0])) { - CustomTitle config = i->second; if (config.MatchUser(user) && config.CheckPass(user, parameters[1])) { ctitle.set(user, config.title); |
