1
0
mirror of https://github.com/anope/anope.git synced 2026-06-25 16:46:37 +02:00

Allow using an account identifier in the anope.account RPC method.

This commit is contained in:
Sadie Powell
2025-05-09 22:02:06 +01:00
parent 07f57b1108
commit 2cf8f003ce
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -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");