diff options
author | Sadie Powell <sadie@witchery.services> | 2025-04-19 22:31:49 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2025-04-19 22:31:49 +0100 |
commit | c8b38197670965c18df603a5a4329f6f583b77d7 (patch) | |
tree | 6522f9517cd23e93debd7524a1f989ee6575a5d6 /docs/RPC/jsonrpc.js | |
parent | e6a1982922c2b8031c14381491a435e4c87b537c (diff) |
Add the anope.account and anope.listAccounts RPC events.
Diffstat (limited to 'docs/RPC/jsonrpc.js')
-rw-r--r-- | docs/RPC/jsonrpc.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/docs/RPC/jsonrpc.js b/docs/RPC/jsonrpc.js index 357cbc844..8f15a4ee8 100644 --- a/docs/RPC/jsonrpc.js +++ b/docs/RPC/jsonrpc.js @@ -45,6 +45,30 @@ class AnopeRPC { } /** + * Retrieves a list of accounts. + * + * Requires the rpc_data module to be loaded. + * + * @param {string} The level of detail to request. + * @returns {array} An array of account names. + */ + listAccounts(detail = "name") { + return this.run("anope.listAccounts", detail); + } + + /** + * Retrieves information about the specified account. + * + * Requires the rpc_data module to be loaded. + * + * @param {string} name The name of the account. + * @returns {object} An object containing information about the account. + */ + account(name) { + return this.run("anope.account", name); + } + + /** * Retrieves a list of channels. * * Requires the rpc_data module to be loaded. |