mirror of
https://github.com/anope/anope.git
synced 2026-07-07 02:23:12 +02:00
Add Block::GetBlocks which returns an iterable list of blocks.
This commit is contained in:
+2
-2
@@ -537,8 +537,8 @@ bool Anope::Init(int ac, char **av)
|
||||
|
||||
/* load modules */
|
||||
Log() << "Loading modules...";
|
||||
for (int i = 0; i < Config->CountBlock("module"); ++i)
|
||||
ModuleManager::LoadModule(Config->GetBlock("module", i).Get<const Anope::string>("name"), NULL);
|
||||
for (const auto &[_, block] : Config->GetBlocks("module"))
|
||||
ModuleManager::LoadModule(block.Get<const Anope::string>("name"), NULL);
|
||||
|
||||
#ifndef _WIN32
|
||||
/* If we're root, issue a warning now */
|
||||
|
||||
Reference in New Issue
Block a user