1
0
mirror of https://github.com/anope/anope.git synced 2026-06-26 15:16:38 +02:00

Add the system.listMethods RPC method.

Still to implement:

- system.getCapabilities
- system.methodHelp
- system.methodSignature
This commit is contained in:
Sadie Powell
2025-02-24 03:39:50 +00:00
parent a111b40560
commit 801a748e25
5 changed files with 90 additions and 2 deletions
+6 -1
View File
@@ -26,7 +26,7 @@ class MyJSONRPCServiceInterface final
, public HTTPPage
{
private:
Anope::map<RPC::Event *> events;
RPC::Events events;
static void SendError(HTTPReply &reply, int64_t code, const Anope::string &message, const Anope::string &id)
{
@@ -86,6 +86,11 @@ public:
{
}
const RPC::Events &GetEvents() override
{
return events;
}
bool Register(RPC::Event *event) override
{
return this->events.emplace(event->GetEvent(), event).second;