summaryrefslogtreecommitdiff
path: root/modules/rpc/jsonrpc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/rpc/jsonrpc.cpp')
-rw-r--r--modules/rpc/jsonrpc.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/modules/rpc/jsonrpc.cpp b/modules/rpc/jsonrpc.cpp
index 8069ed8eb..163658495 100644
--- a/modules/rpc/jsonrpc.cpp
+++ b/modules/rpc/jsonrpc.cpp
@@ -281,12 +281,14 @@ public:
for (int i = 0; i < modconf.CountBlock("token"); ++i)
{
const auto &block = modconf.GetBlock("token", i);
- const auto &token = block.Get<const Anope::string>("token");
- if (!token.empty())
+
+ RPC::Token token;
+ token.token = block.Get<const Anope::string>("token");
+ if (!token.token.empty())
{
- std::vector<Anope::string> methods;
- spacesepstream(block.Get<const Anope::string>("methods")).GetTokens(methods);
- jsonrpcinterface.tokens.emplace(token, methods);
+ token.token_hash = block.Get<const Anope::string>("token_hash");
+ spacesepstream(block.Get<const Anope::string>("methods")).GetTokens(token.methods);
+ jsonrpcinterface.tokens.emplace_back(token);
}
}