forked from ppfun/pixelplanet
increase country stats even when user is not logged in
This commit is contained in:
parent
1831bb4b05
commit
5c3ac63889
|
@ -21,7 +21,7 @@ const PREFIX = 'cd';
|
||||||
* and returns the number of pixels to set
|
* and returns the number of pixels to set
|
||||||
* @param ip ip of request
|
* @param ip ip of request
|
||||||
* @param id userId
|
* @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 clrIgnore, bcd, pcd, cds information about canvas
|
||||||
* @param i, j chunk coordinates
|
* @param i, j chunk coordinates
|
||||||
* @param pxls Array with offsets of pixels
|
* @param pxls Array with offsets of pixels
|
||||||
|
|
|
@ -146,10 +146,10 @@ if pxlcnt > 0 then
|
||||||
if KEYS[7] ~= 'nope' then
|
if KEYS[7] ~= 'nope' then
|
||||||
redis.call('zincrby', KEYS[6], pxlcnt, ARGV[6])
|
redis.call('zincrby', KEYS[6], pxlcnt, ARGV[6])
|
||||||
redis.call('zincrby', KEYS[7], pxlcnt, ARGV[6])
|
redis.call('zincrby', KEYS[7], pxlcnt, ARGV[6])
|
||||||
-- increase country stats only by registered users
|
end
|
||||||
if ARGV[7] ~= 'xx' then
|
-- increase country stats
|
||||||
redis.call('zincrby', KEYS[8], pxlcnt, ARGV[7])
|
if ARGV[7] ~= 'xx' then
|
||||||
end
|
redis.call('zincrby', KEYS[8], pxlcnt, ARGV[7])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user