Use auth_handler's enumerate_auths (not auth_table) if available

This commit is contained in:
Dorian Wouters 2016-08-23 01:36:57 +02:00
parent 974b47f8f6
commit d200b342e9
No known key found for this signature in database
GPG Key ID: 6E9DA8063322434B
1 changed files with 2 additions and 1 deletions

View File

@ -9,7 +9,8 @@ local ESC = minetest.formspec_escape
local function make_list(filter)
filter = filter or ""
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 n >= MAXLISTSIZE then
dropped = true