From 2cf8f003ce318997f3259ef1c8bd082d4569057a Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 9 May 2025 22:02:06 +0100 Subject: Allow using an account identifier in the anope.account RPC method. --- modules/rpc/rpc_data.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules') 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"); -- cgit