mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2024-12-23 02:28:01 +00:00
Extra Lua optimizations (minimize table lookups).
This commit is contained in:
parent
8d3681dc1f
commit
90612fa98a
@ -9,10 +9,12 @@ for _, proxy in ipairs(ARGV) do
|
||||
for _, player in ipairs(players) do
|
||||
local server = call("HGET", "player:" .. player, "server")
|
||||
if server then
|
||||
if not serverToData[server] then
|
||||
local map = serverToData[server]
|
||||
if not map then
|
||||
serverToData[server] = {}
|
||||
map = serverToData[server]
|
||||
end
|
||||
insert(serverToData[server], player)
|
||||
insert(map, player)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user