1
0
mirror of https://github.com/anope/anope.git synced 2026-06-30 01:16:38 +02:00

Add Block::GetBlocks which returns an iterable list of blocks.

This commit is contained in:
Sadie Powell
2026-06-08 15:19:47 +01:00
parent ab362c9828
commit 90da25f84f
24 changed files with 142 additions and 99 deletions
+1 -4
View File
@@ -372,11 +372,8 @@ public:
const auto &conf = config.GetModule(this);
std::set<Anope::string> existing;
for (int i = 0; i < conf.CountBlock("httpd"); ++i)
for (const auto &[_, block] : conf.GetBlocks("httpd"))
{
const auto &block = conf.GetBlock("httpd", i);
const Anope::string &hname = block.Get<const Anope::string>("name", "httpd/main");
existing.insert(hname);