]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Remove more useless code from ratelimit 950/head
authorAndrew Lewis <nerf@judo.za.org>
Tue, 13 Sep 2016 13:01:52 +0000 (15:01 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Tue, 13 Sep 2016 13:01:52 +0000 (15:01 +0200)
src/plugins/lua/ratelimit.lua

index 67fd51aba1b1d5a31049a81e3f07ffae18071ac9..35b0a6cac9a88a25ca778f349b050e5a0d69643b 100644 (file)
@@ -162,8 +162,6 @@ local function dynamic_rate_key(task, rtype)
   for _, v in ipairs(key_keywords) do
     if (custom_keywords[v] and type(custom_keywords[v]['condition']) == 'function') then
       if not custom_keywords[v]['condition']() then return nil end
-    elseif (keywords[v] and type(keywords[v]['condition']) == 'function') then
-      if not keywords[v]['condition']() then return nil end
     end
     local ret
     if custom_keywords[v] and type(custom_keywords[v]['get_value']) == 'function' then