mres = rspamd_find_metric_result (task, lua_tostring (L, 3));
}
+ if (mres == NULL) {
+ lua_pushnil (L);
+
+ return 1;
+ }
+
lua_createtable (L, 0, kh_size (mres->sym_groups));
kh_foreach (mres->sym_groups, gr, gr_score, {
if (lua_isstring (L, 2)) {
metric_res = rspamd_find_metric_result (task, lua_tostring (L, 2));
+
+ if (metric_res == NULL) {
+ lua_pushnil (L);
+
+ return 1;
+ }
}
/* Fields added:
mres = rspamd_find_metric_result (task, lua_tostring (L, 2));
}
+ if (mres == NULL) {
+ lua_pushnil (L);
+
+ return 1;
+ }
+
action = rspamd_check_action_metric (task, NULL, mres);
lua_pushstring (L, action->name);
}