Pārlūkot izejas kodu

[Minor] Reputation: deal with inbound/outbound both set

tags/1.7.0
Andrew Lewis pirms 6 gadiem
vecāks
revīzija
8be47cd463
1 mainītis faili ar 9 papildinājumiem un 7 dzēšanām
  1. 9
    7
      src/plugins/lua/reputation.lua

+ 9
- 7
src/plugins/lua/reputation.lua Parādīt failu

@@ -763,13 +763,15 @@ local backends = {

local function is_rule_applicable(task, rule)
local ip = task:get_from_ip()
if rule.selector.config.outbound then
if not (task:get_user() or (ip and ip:is_local())) then
return false
end
elseif rule.selector.config.inbound then
if task:get_user() or (ip and ip:is_local()) then
return false
if not (rule.selector.config.outbound and rule.selector.config.inbound) then
if rule.selector.config.outbound then
if not (task:get_user() or (ip and ip:is_local())) then
return false
end
elseif rule.selector.config.inbound then
if task:get_user() or (ip and ip:is_local()) then
return false
end
end
end


Notiek ielāde…
Atcelt
Saglabāt