cactuz_pl wrote:Still it doesn't remember list, future_banlist.txt doesn't exist (in world folder). But server starts.
When I created future_banlist.txt in world folder, I can see on server start:Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
Server: error:
...(path to mod folder)/init.lua:49: bad argument #1 toYour phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
minetest.register_on_joinplayer(function(player)
local name = player:get_player_name()
for i,n in ipairs(future_ban_list) do <------------------------------ 49th line
if n == name then
if not minetest.ban_player(name) then
minetest.chat_send_player(name, "Failed to ban player " .. name .. " (from future ban list).")
else
local desc = minetest.get_ban_description(name)
minetest.log("action", desc .. " banned (from future ban list).")
table.remove(future_ban_list, i)
end
end
end
end)
Thanks
The mod generates the file. You cant add names to this file. You have to add them all in-game with the command.