浏览代码

[Fix] Fix setting of score for parts differ

tags/1.3.0
Vsevolod Stakhov 8 年前
父节点
当前提交
ef82676590
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3
    2
      rules/misc.lua

+ 3
- 2
rules/misc.lua 查看文件

@@ -93,12 +93,13 @@ rspamd_config.R_PARTS_DIFFER = function(task)
local tw = task:get_mempool():get_variable('total_words', 'int')

if tw then
local score
if tw > 30 then
-- We are confident about difference
local score = (nd - 0.5) * 2.0
score = (nd - 0.5) * 2.0
else
-- We are not so confident about difference
local score = (nd - 0.5)
score = (nd - 0.5)
end
task:insert_result('R_PARTS_DIFFER', score, tostring(100.0 * nd) .. '%')
end

正在加载...
取消
保存