increase country stats even when user is not logged in

This commit is contained in:
HF 2023-12-28 16:58:52 +01:00
parent 1831bb4b05
commit 5c3ac63889
2 changed files with 5 additions and 5 deletions

View File

@ -21,7 +21,7 @@ const PREFIX = 'cd';
* and returns the number of pixels to set
* @param ip ip of request
* @param id userId
* @param ranked boolean if increasing rank
* @param ranked boolean if increasing rank (should only be true if logged in)
* @param clrIgnore, bcd, pcd, cds information about canvas
* @param i, j chunk coordinates
* @param pxls Array with offsets of pixels

View File

@ -146,10 +146,10 @@ if pxlcnt > 0 then
if KEYS[7] ~= 'nope' then
redis.call('zincrby', KEYS[6], pxlcnt, ARGV[6])
redis.call('zincrby', KEYS[7], pxlcnt, ARGV[6])
-- increase country stats only by registered users
if ARGV[7] ~= 'xx' then
redis.call('zincrby', KEYS[8], pxlcnt, ARGV[7])
end
end
-- increase country stats
if ARGV[7] ~= 'xx' then
redis.call('zincrby', KEYS[8], pxlcnt, ARGV[7])
end
end