1
0
mirror of https://github.com/SmallJoker/names_per_ip.git synced 2025-06-30 14:40:20 +02:00

Proper IP getter. Skip check for registered accounts

This commit is contained in:
SmallJoker
2019-04-13 11:29:59 +02:00
parent da6110de50
commit 846e1848ea
2 changed files with 15 additions and 15 deletions

View File

@ -45,7 +45,7 @@ function ipnames.command_unignore(name, param)
return true, "Removed '" .. param .. "' from the name whitelist."
end
local player_auth_exists = minetest.player_exists
ipnames.is_registered = minetest.player_exists
or function(name)
-- 0.4.x support: If you get a nil error here -> update Minetest
return minetest.auth_table[name]
@ -62,7 +62,7 @@ function ipnames.load_data()
local data = line:split("|")
if #data >= 2 then
-- Ignore players which were removed (according to auth)
local player_exists = player_auth_exists(data[1])
local player_exists = ipnames.is_registered(data[1])
if player_exists then
data[3] = tonumber(data[3]) or 0