From 18dfa62626468c18177ba6ff24be34f4b64f1d37 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 19 Apr 2025 13:16:28 +0100 Subject: Add expanded data to the rpc_data list events. --- docs/RPC/jsonrpc.js | 20 ++++++++++++-------- docs/RPC/rpc_data.md | 32 ++++++++++++++++++++++++-------- 2 files changed, 36 insertions(+), 16 deletions(-) (limited to 'docs') diff --git a/docs/RPC/jsonrpc.js b/docs/RPC/jsonrpc.js index b726678a2..357cbc844 100644 --- a/docs/RPC/jsonrpc.js +++ b/docs/RPC/jsonrpc.js @@ -49,10 +49,11 @@ class AnopeRPC { * * Requires the rpc_data module to be loaded. * + * @param {string} The level of detail to request. * @returns {array} An array of channel names. */ - listChannels() { - return this.run("anope.listChannels"); + listChannels(detail = "name") { + return this.run("anope.listChannels", detail); } /** @@ -72,10 +73,11 @@ class AnopeRPC { * * Requires the rpc_data module to be loaded. * + * @param {string} The level of detail to request. * @returns {array} An array of channel names. */ - listOpers() { - return this.run("anope.listOpers"); + listOpers(detail = "name") { + return this.run("anope.listOpers", detail); } /** @@ -95,10 +97,11 @@ class AnopeRPC { * * Requires the rpc_data module to be loaded. * + * @param {string} The level of detail to request. * @returns {array} An array of servers names. */ - listServers() { - return this.run("anope.listServers"); + listServers(detail = "name") { + return this.run("anope.listServers", detail); } /** @@ -118,10 +121,11 @@ class AnopeRPC { * * Requires the rpc_data module to be loaded. * + * @param {string} The level of detail to request. * @returns {array} An array of channel names. */ - listUsers() { - return this.run("anope.listUsers"); + listUsers(detail = "name") { + return this.run("anope.listUsers", detail); } /** diff --git a/docs/RPC/rpc_data.md b/docs/RPC/rpc_data.md index 9ba1ae8ac..6aa16bd3a 100644 --- a/docs/RPC/rpc_data.md +++ b/docs/RPC/rpc_data.md @@ -6,11 +6,15 @@ Lists all channels that exist on the network. ### Parameters -*None* +Index | Description +----- | ----------- +0 | If specified then the level of detail to retrieve. Can be set to "full" to retrieve all detail or "name" to just retrieve the channel names. Defaults to "name". ### Errors -*Only standard RPC errors* +Code | Description +------ | ----------- +-32099 | The specified detail level does not exist. ### Result @@ -81,11 +85,15 @@ Lists all services operators that exist on the network. ### Parameters -*None* +Index | Description +----- | ----------- +0 | If specified then the level of detail to retrieve. Can be set to "full" to retrieve all detail or "name" to just retrieve the services operator nicknames. Defaults to "name". ### Errors -*Only standard RPC errors* +Code | Description +------ | ----------- +-32099 | The specified detail level does not exist. ### Result @@ -154,11 +162,15 @@ Lists all servers that exist on the network. ### Parameters -*None* +Index | Description +----- | ----------- +0 | If specified then the level of detail to retrieve. Can be set to "full" to retrieve all detail or "name" to just retrieve the server names. Defaults to "name". ### Errors -*Only standard RPC errors* +Code | Description +------ | ----------- +-32099 | The specified detail level does not exist. ### Result @@ -222,11 +234,15 @@ Lists all users that exist on the network. ### Parameters -*None* +Index | Description +----- | ----------- +0 | If specified then the level of detail to retrieve. Can be set to "full" to retrieve all detail or "name" to just retrieve the user nicknames. Defaults to "name". ### Errors -*Only standard RPC errors* +Code | Description +------ | ----------- +-32099 | The specified detail level does not exist. ### Result -- cgit