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:
+1
-4
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user