diff --git a/src/data/redis/lua/placePixel.lua b/src/data/redis/lua/placePixel.lua index f8d3381..f81a5c0 100644 --- a/src/data/redis/lua/placePixel.lua +++ b/src/data/redis/lua/placePixel.lua @@ -25,6 +25,12 @@ -- 5: if we have to update isAllowed( proxycheck) -- } 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 local ia = redis.call('get', KEYS[1]) if not ia then @@ -45,12 +51,6 @@ else return ret 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 local cd = redis.call('pttl', KEYS[3]) if cd < 0 then