summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/extra/xmlrpc.cpp12
-rw-r--r--modules/rpc/jsonrpc.cpp12
2 files changed, 14 insertions, 10 deletions
diff --git a/modules/extra/xmlrpc.cpp b/modules/extra/xmlrpc.cpp
index 24f5f5f0e..3e6a8af76 100644
--- a/modules/extra/xmlrpc.cpp
+++ b/modules/extra/xmlrpc.cpp
@@ -324,12 +324,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);
- xmlrpcinterface.tokens.emplace(token, methods);
+ token.token_hash = block.Get<const Anope::string>("token_hash");
+ spacesepstream(block.Get<const Anope::string>("methods")).GetTokens(token.methods);
+ xmlrpcinterface.tokens.emplace_back(token);
}
}
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);
}
}