forked from minetest-mods/xban2
Use auth_handler's enumerate_auths (not auth_table) if available
This commit is contained in:
parent
974b47f8f6
commit
d200b342e9
3
gui.lua
3
gui.lua
@ -9,7 +9,8 @@ local ESC = minetest.formspec_escape
|
|||||||
local function make_list(filter)
|
local function make_list(filter)
|
||||||
filter = filter or ""
|
filter = filter or ""
|
||||||
local list, n, dropped = { }, 0, false
|
local list, n, dropped = { }, 0, false
|
||||||
for k in pairs(minetest.auth_table) do
|
local enumerate = minetest.get_auth_handler().enumerate_auths
|
||||||
|
for k in enumerate and enumerate() or pairs(minetest.auth_table) do
|
||||||
if strfind(k, filter, 1, true) then
|
if strfind(k, filter, 1, true) then
|
||||||
if n >= MAXLISTSIZE then
|
if n >= MAXLISTSIZE then
|
||||||
dropped = true
|
dropped = true
|
||||||
|
Loading…
Reference in New Issue
Block a user