aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_restrictchans.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_restrictchans.cpp')
-rw-r--r--src/modules/m_restrictchans.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/modules/m_restrictchans.cpp b/src/modules/m_restrictchans.cpp
index 6bc2c13dd..f08e806dd 100644
--- a/src/modules/m_restrictchans.cpp
+++ b/src/modules/m_restrictchans.cpp
@@ -61,12 +61,11 @@ class ModuleRestrictChans : public Module
void ReadConfig(ConfigStatus& status) override
{
AllowChans newallows;
- ConfigTagList tags = ServerInstance->Config->ConfTags("allowchannel");
- for (ConfigIter i = tags.first; i != tags.second; ++i)
+ for (auto& [_, tag] : ServerInstance->Config->ConfTags("allowchannel"))
{
- const std::string name = i->second->getString("name");
+ const std::string name = tag->getString("name");
if (name.empty())
- throw ModuleException("Empty <allowchannel:name> at " + i->second->getTagLocation());
+ throw ModuleException("Empty <allowchannel:name> at " + tag->getTagLocation());
newallows.insert(name);
}