瀏覽代碼

[Minor] Rbl: Fix require symbols option

tags/3.2
Vsevolod Stakhov 2 年之前
父節點
當前提交
5890935eb1
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 8 行新增1 行删除
  1. 8
    1
      src/plugins/lua/rbl.lua

+ 8
- 1
src/plugins/lua/rbl.lua 查看文件

@@ -423,6 +423,12 @@ local function gen_rbl_callback(rule)
return true
end

local function check_required_symbols(task, _)
if rule.require_symbols then
return fun.all(function(sym) task:has_symbol(sym) end, rule.require_symbols)
end
end

local function check_user(task, _)
if task:get_user() then
return false
@@ -741,7 +747,8 @@ local function gen_rbl_callback(rule)

-- Create function pipeline depending on rbl settings
local pipeline = {
is_alive, -- generic for all
is_alive, -- check monitored status
check_required_symbols -- if we have require_symbols then check those symbols
}
local description = {
'alive',

Loading…
取消
儲存