Merge branch 'devel'
This commit is contained in:
commit
9681209320
|
@ -25,6 +25,12 @@
|
||||||
-- 5: if we have to update isAllowed( proxycheck)
|
-- 5: if we have to update isAllowed( proxycheck)
|
||||||
-- }
|
-- }
|
||||||
local ret = {0, 0, 0, 0, 0}
|
local ret = {0, 0, 0, 0, 0}
|
||||||
|
-- check if captcha is needed
|
||||||
|
if KEYS[2] ~= "nope" and not redis.call('get', KEYS[2]) then
|
||||||
|
-- captcha
|
||||||
|
ret[1] = 10
|
||||||
|
return ret
|
||||||
|
end
|
||||||
-- check if isAllowed
|
-- check if isAllowed
|
||||||
local ia = redis.call('get', KEYS[1])
|
local ia = redis.call('get', KEYS[1])
|
||||||
if not ia then
|
if not ia then
|
||||||
|
@ -45,12 +51,6 @@ else
|
||||||
return ret
|
return ret
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- check if captcha is needed
|
|
||||||
if KEYS[2] ~= "nope" and not redis.call('get', KEYS[2]) then
|
|
||||||
-- captcha
|
|
||||||
ret[1] = 10
|
|
||||||
return ret
|
|
||||||
end
|
|
||||||
-- get cooldown of user
|
-- get cooldown of user
|
||||||
local cd = redis.call('pttl', KEYS[3])
|
local cd = redis.call('pttl', KEYS[3])
|
||||||
if cd < 0 then
|
if cd < 0 then
|
||||||
|
|
Loading…
Reference in New Issue
Block a user