1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-12-25 18:20:36 +01:00
server-nalc/mods/_misc/nointeract_messages.lua
LeMagnesium 11a121f7df Fixed /rules and added blacklist system
- Removed useless copy of /rules
 - Added a blacklist system avoiding people to get back the interact privilege using /rules when blacklisted
2015-06-29 20:19:40 +02:00

18 lines
773 B
Lua
Executable File

local TIMER = 0
minetest.register_globalstep(function(dtime)
TIMER = TIMER + dtime
if TIMER < 20 then return end
TIMER = 0
for _,player in ipairs(minetest.get_connected_players()) do
local name = player:get_player_name()
if not minetest.check_player_privs(name, {interact=true}) then
if not interact.blacklist[name] then
if minetest.check_player_privs(name, {shout=true}) then
minetest.chat_send_player(name, "Hey " .. name .. " ! Pour pouvoir construire et intéragir sur ce serveur, tu dois lire les règles du serveur et les accepter. Tape /rules.")
minetest.chat_send_player(name, "Hey " .. name .. " ! To build and interact on this server, you have to read the rules of our server and agree them. Type /rules.")
end
end
end
end
end)