aboutsummaryrefslogtreecommitdiff
path: root/src/listmode.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2020-10-31 20:03:19 +0000
committerGravatar Sadie Powell2020-10-31 22:33:35 +0000
commit441bd151da733d32e194de6e4a1744ae273b83ee (patch)
tree74eb1ee2aef413185bf3906a17f1b2c27373e03a /src/listmode.cpp
parentFix reading the <sslprofile> config. (diff)
Add stdalgo::iterator_range and switch config tag reading to use it.
This allows us to use range-based for loops which were not possible with the previous config tag system.
Diffstat (limited to 'src/listmode.cpp')
-rw-r--r--src/listmode.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/listmode.cpp b/src/listmode.cpp
index 4ce7647e9..551f061c0 100644
--- a/src/listmode.cpp
+++ b/src/listmode.cpp
@@ -65,13 +65,11 @@ void ListModeBase::RemoveMode(Channel* channel, Modes::ChangeList& changelist)
void ListModeBase::DoRehash()
{
- ConfigTagList tags = ServerInstance->Config->ConfTags("maxlist");
limitlist newlimits;
bool seen_default = false;
- for (ConfigIter i = tags.first; i != tags.second; i++)
- {
- ConfigTag* c = i->second;
+ for (auto& [_, c] : ServerInstance->Config->ConfTags("maxlist"))
+ {
const std::string mname = c->getString("mode");
if (!mname.empty() && !stdalgo::string::equalsci(mname, name) && !(mname.length() == 1 && GetModeChar() == mname[0]))
continue;