1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-06-29 23:56:38 +02:00

Fix JSON-RPC response, should be in "result" and not in "response".

This breaks all the current script(s) that depend on it, of course,
but makes us correctly conform to the JSON-RPC specification.
Reported by Valware.
This commit is contained in:
Bram Matthys
2022-08-17 16:56:33 +02:00
parent 0d139c6e7c
commit 3ca99ddd52
+1 -1
View File
@@ -494,7 +494,7 @@ void _rpc_response(Client *client, json_t *request, json_t *result)
json_object_set_new(j, "method", json_string_unreal(method));
if (id)
json_object_set_new(j, "id", id); /* 'id' is optional */
json_object_set(j, "response", result);
json_object_set(j, "result", result);
json_serialized = json_dumps(j, 0);
if (!json_serialized)