TRUE if the query is being processed or FALSE on error. */
SilcBool silc_server_query_command(SilcServer server, SilcCommand querycmd,
- SilcServerCommandContext cmd)
+ SilcServerCommandContext cmd)
{
SilcServerQuery query;
SilcAttributeObjPk pk;
SilcPublicKey publickey, cmp_pubkey;
SilcPKCSType type;
- SilcBool found = FALSE, no_clients = FALSE;
+ SilcBool found = FALSE, no_clients = FALSE, search_pubkey = FALSE;
int i;
/* If no clients were found, we only check the attributes
silc_free(pk.data);
continue;
}
+ search_pubkey = TRUE;
/* If no clients were set on calling this function, we just search
for clients, otherwise we try to limit the clients. */
if (!found && !query->nickname[0] && !query->ids)
silc_server_query_add_error(server, query, 2, 0,
- SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
+ search_pubkey ?
+ SILC_STATUS_ERR_NO_SUCH_PUBLIC_KEY :
+ SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
}
/* Processes the parsed query. This does the actual finding of the
FALSE if setting some mode is not allowed. */
SilcBool silc_server_check_umode_rights(SilcServer server,
- SilcClientEntry client,
- SilcUInt32 mode)
+ SilcClientEntry client,
+ SilcUInt32 mode)
{
SilcBool server_op = FALSE, router_op = FALSE;