diff options
Diffstat (limited to 'src/modules/m_chanlog.cpp')
| -rw-r--r-- | src/modules/m_chanlog.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/modules/m_chanlog.cpp b/src/modules/m_chanlog.cpp index 8dff4123d..8250a5d98 100644 --- a/src/modules/m_chanlog.cpp +++ b/src/modules/m_chanlog.cpp @@ -42,19 +42,14 @@ class ModuleChanLog : public Module void ReadConfig(ConfigStatus& status) override { - std::string snomasks; - std::string channel; ChanLogTargets newlogs; - - ConfigTagList tags = ServerInstance->Config->ConfTags("chanlog"); - for (ConfigIter i = tags.first; i != tags.second; ++i) + for (auto& [_, tag] : ServerInstance->Config->ConfTags("chanlog")) { - channel = i->second->getString("channel"); - snomasks = i->second->getString("snomasks"); - + std::string channel = tag->getString("channel"); + std::string snomasks = tag->getString("snomasks"); if (channel.empty() || snomasks.empty()) { - throw ModuleException("Malformed chanlog tag at " + i->second->getTagLocation()); + throw ModuleException("Malformed chanlog tag at " + tag->getTagLocation()); } for (std::string::const_iterator it = snomasks.begin(); it != snomasks.end(); it++) |
