diff options
author | Sadie Powell <sadie@witchery.services> | 2025-02-24 03:39:50 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2025-02-24 03:59:52 +0000 |
commit | 801a748e256cb7c4952969103f2f2eaf5ee36552 (patch) | |
tree | 2dae96409362ee42b2591128a1ba42896226ecd2 /modules/rpc/jsonrpc.cpp | |
parent | a111b40560bf305653b07d8f7289484793a32588 (diff) |
Add the system.listMethods RPC method.
Still to implement:
- system.getCapabilities
- system.methodHelp
- system.methodSignature
Diffstat (limited to 'modules/rpc/jsonrpc.cpp')
-rw-r--r-- | modules/rpc/jsonrpc.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/rpc/jsonrpc.cpp b/modules/rpc/jsonrpc.cpp index 22c00b118..fc4c40e83 100644 --- a/modules/rpc/jsonrpc.cpp +++ b/modules/rpc/jsonrpc.cpp @@ -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; |