mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2024-10-31 18:48:01 +00:00
Slightly simplified the Lua code.
This commit is contained in:
parent
85eea7746e
commit
d7b3568eec
@ -6,12 +6,10 @@ for _, proxy in ipairs(ARGV) do
|
||||
for _, player in ipairs(players) do
|
||||
local server = redis.call("HGET", "player:" .. player, "server")
|
||||
if server then
|
||||
if serverToData[server] then
|
||||
local data = serverToData[server]
|
||||
data[#data + 1] = player
|
||||
else
|
||||
if not serverToData[server] then
|
||||
serverToData[server] = {player}
|
||||
end
|
||||
table.insert(serverToData[server], player)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user