diff options
-rw-r--r-- | docs/RPC/rpc_data.md | 2 | ||||
-rw-r--r-- | modules/rpc/rpc_data.cpp | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/docs/RPC/rpc_data.md b/docs/RPC/rpc_data.md index a42f7b5be..fddf19276 100644 --- a/docs/RPC/rpc_data.md +++ b/docs/RPC/rpc_data.md @@ -36,7 +36,7 @@ Retrieves information about the specified account. Index | Description ----- | ----------- -0 | A nickname belonging to the account. +0 | Either a nickname belonging to the account or an account identifier. ### Errors 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"); |