- if (!policy_run_filter(query, NULL, NULL)) {
- policy_answer(pcy, "DUNNO");
+ filter_t *filter = array_ptr(config->filters, config->entry_point);
+ while (true) {
+ filter_hook_t *hook = filter_run(filter, query);
+ if (hook == NULL) {
+ policy_answer(pcy, "DUNNO");
+ return;
+ } else if (hook->postfix) {
+ policy_answer(pcy, "%s", hook->value);
+ return;
+ } else {
+ filter = array_ptr(config->filters, hook->filter_id);
+ }