1
0
mirror of https://github.com/anope/anope.git synced 2026-06-30 15:06:39 +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
+2 -3
View File
@@ -313,10 +313,9 @@ public:
throw ConfigException("Unable to find http reference, is httpd loaded?");
jsonrpcinterface.tokens.clear();
for (int i = 0; i < modconf.CountBlock("token"); ++i)
{
const auto &block = modconf.GetBlock("token", i);
for (const auto &[_, block] : modconf.GetBlocks("token"))
{
RPC::Token token;
token.token = block.Get<const Anope::string>("token");
if (!token.token.empty())