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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user