1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-06 14:33:13 +02:00

RPC spamfilter.*: fix validations not working due to changes yesterday

This commit is contained in:
Bram Matthys
2022-12-06 17:20:29 +01:00
parent fe8661da3d
commit 36d9e8e720
+2 -2
View File
@@ -129,7 +129,7 @@ int spamfilter_select_criteria(Client *client, json_t *request, json_t *params,
return 0;
}
*targets = spamfilter_gettargets(str, NULL);
if (!targets)
if (!*targets)
{
rpc_error(client, request, JSON_RPC_ERROR_INVALID_PARAMS, "Invalid value(s) for parameter 'spamfilter_targets'");
return 0;
@@ -143,7 +143,7 @@ int spamfilter_select_criteria(Client *client, json_t *request, json_t *params,
return 0;
}
*action = banact_stringtoval(str);
if (!action)
if (!*action)
{
rpc_error(client, request, JSON_RPC_ERROR_INVALID_PARAMS, "Invalid value for parameter 'ban_action'");
return 0;