Procházet zdrojové kódy

Set required_score = reject score and minor change to the report

tags/3.5
Amish před 1 rokem
rodič
revize
05d04ed46c
1 změnil soubory, kde provedl 12 přidání a 7 odebrání
  1. 12
    7
      src/client/rspamc.cxx

+ 12
- 7
src/client/rspamc.cxx Zobrazit soubor

const auto *thresholds_obj = ucl_object_lookup(obj, "thresholds"); const auto *thresholds_obj = ucl_object_lookup(obj, "thresholds");


if (thresholds_obj && ucl_object_type(thresholds_obj) == UCL_OBJECT) { if (thresholds_obj && ucl_object_type(thresholds_obj) == UCL_OBJECT) {
const auto *greylist_obj = ucl_object_lookup(thresholds_obj, "greylist");
if (greylist_obj) {
greylist_score = ucl_object_todouble(greylist_obj);
const auto *action_obj = ucl_object_lookup(thresholds_obj, "greylist");
if (action_obj) {
greylist_score = ucl_object_todouble(action_obj);
} }


const auto *add_header_obj = ucl_object_lookup(thresholds_obj, "add header");
if (add_header_obj) {
addheader_score = ucl_object_todouble(add_header_obj);
action_obj = ucl_object_lookup(thresholds_obj, "add header");
if (action_obj) {
addheader_score = ucl_object_todouble(action_obj);
}

action_obj = ucl_object_lookup(thresholds_obj, "reject");
if (action_obj) {
required_score = ucl_object_todouble(action_obj);
} }
} }


if (humanreport) { if (humanreport) {
fmt::print(out, "Content analysis details: ({} points, {} required)\n\n", fmt::print(out, "Content analysis details: ({} points, {} required)\n\n",
emphasis_argument(score, 2), emphasis_argument(score, 2),
emphasis_argument(required_score, 2));
emphasis_argument(addheader_score, 2));
fmt::print(out, " pts rule name description\n"); fmt::print(out, " pts rule name description\n");
fmt::print(out, "---- ---------------------- --------------------------------------------------\n"); fmt::print(out, "---- ---------------------- --------------------------------------------------\n");
} }

Načítá se…
Zrušit
Uložit