diff options
author | Sadie Powell <sadie@witchery.services> | 2025-05-09 22:02:06 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2025-05-09 22:02:06 +0100 |
commit | 2cf8f003ce318997f3259ef1c8bd082d4569057a (patch) | |
tree | 6a4a2d089a8804da7fc7f85fdf8f573f5b5b6d4c /modules | |
parent | 07f57b11083c3126e256dc381ab3646a01f71d66 (diff) |
Allow using an account identifier in the anope.account RPC method.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/rpc/rpc_data.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/rpc/rpc_data.cpp b/modules/rpc/rpc_data.cpp index c4ab43d69..dca1434db 100644 --- a/modules/rpc/rpc_data.cpp +++ b/modules/rpc/rpc_data.cpp @@ -173,7 +173,9 @@ public: bool Run(RPC::ServiceInterface *iface, HTTP::Client *client, RPC::Request &request) override { - auto *na = NickAlias::Find(request.data[0]); + auto *na = request.data[0].is_pos_number_only() + ? NickAlias::FindId(Anope::Convert(request.data[0], 0)) + : NickAlias::Find(request.data[0]); if (!na) { request.Error(ERR_NO_SUCH_TARGET, "No such account"); |