1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-12-24 17:50:37 +01:00

Reverting minetest.env: calls

- Last minetest.env: calls removed
- IRC rules' table moves into a list
This commit is contained in:
LeMagnesium 2014-11-09 21:28:11 +01:00
parent 602710aa58
commit 26cb4ff6ae
4 changed files with 37 additions and 34 deletions

View File

@ -84,7 +84,7 @@ minetest.register_chatcommand("ban", {
-- description = "Teleport to the spawn location.", -- description = "Teleport to the spawn location.",
-- privs = {shout=true}, -- privs = {shout=true},
-- func = function(name, param) -- func = function(name, param)
-- local player = minetest.env:get_player_by_name(name) -- local player = minetest.get_player_by_name(name)
-- minetest.chat_send_player(name, "Teleported to spawn!") -- minetest.chat_send_player(name, "Teleported to spawn!")
-- player:setpos({x=0.0, y=5.0, z=0.0}) -- player:setpos({x=0.0, y=5.0, z=0.0})
-- return true -- return true
@ -97,7 +97,7 @@ minetest.register_chatcommand("sethome", {
description = "Set your home location.", description = "Set your home location.",
privs = {shout=true}, privs = {shout=true},
func = function(name, param) func = function(name, param)
player = minetest.env:get_player_by_name(name) player = minetest.get_player_by_name(name)
test = player:getpos() test = player:getpos()
local file = io.open(minetest.get_worldpath().."/home/"..player:get_player_name().."_home", "w") local file = io.open(minetest.get_worldpath().."/home/"..player:get_player_name().."_home", "w")
if not file then if not file then
@ -116,7 +116,7 @@ minetest.register_chatcommand("home", {
description = "Vous teleporte a l'emplacement de votre 'home'.", description = "Vous teleporte a l'emplacement de votre 'home'.",
privs = {shout=true}, privs = {shout=true},
func = function(name, param) func = function(name, param)
player = minetest.env:get_player_by_name(name) player = minetest.get_player_by_name(name)
local file = io.open(minetest.get_worldpath().."/home/"..player:get_player_name().."_home", "r") local file = io.open(minetest.get_worldpath().."/home/"..player:get_player_name().."_home", "r")
if not file then if not file then
minetest.chat_send_player(name, "Vous devez definir votre emplacement 'home' ! Pour ce faire, utilisez la commande /sethome.") minetest.chat_send_player(name, "Vous devez definir votre emplacement 'home' ! Pour ce faire, utilisez la commande /sethome.")
@ -129,7 +129,7 @@ minetest.register_chatcommand("home", {
minetest.chat_send_player(name, "Il y a eut une erreur, s'il vous plait contactez le detenteur du serveur.") minetest.chat_send_player(name, "Il y a eut une erreur, s'il vous plait contactez le detenteur du serveur.")
return return
end end
minetest.env:get_player_by_name(name):setpos(pos) minetest.get_player_by_name(name):setpos(pos)
minetest.chat_send_player(name, "Vous voilà chez vous.") minetest.chat_send_player(name, "Vous voilà chez vous.")
end end
}) })

View File

@ -15,24 +15,27 @@ local IRC = [[
7) Il ne sera toléré aucun type de discrimination contre quelque participant que ce soit, ni aucune forme d'insulte envers les opérateurs, semi-opérateurs et administrateurs d'InchraNet. 7) Il ne sera toléré aucun type de discrimination contre quelque participant que ce soit, ni aucune forme d'insulte envers les opérateurs, semi-opérateurs et administrateurs d'InchraNet.
Voici les sanctions prévues pour les infractions aux règles ci-dessus. Voici les sanctions prévues pour les infractions aux règles ci-dessus.
+-----------------------+-----------------------------------+---------------------------------------+
| Niveau d'infraction : | Infraction(s) commise(s) : | Sanctions appliquées : | - Infraction niveau DIRT :
| | Manque de respect enver autrui | Devoice une demi-journée | Manque de respect envers autrui : Devoice une journée
| Niveau DIRT | Provocation envers autrui | Devoie une journée | Provocation envers autrui : Devoice une journée
| | Insultes envers autrui | Kick + devoice une journée | Insultes envers autrui : Kick + Devoice une journée
+-----------------------+-----------------------------------+---------------------------------------+
| | Récidive d'infraction niveau dirt | Kick + Ban 1/2 journée | - Infraction niveau STONE :
| Niveau STONE | Flood, Discrimination | Kick + devoice deux heures | - Récidivide d'infraction niveau dirt : Kick + Ban 1/2 journée
| | Spam | Kick + devoice 1 jour + ban 1/2 journée | - Flood, Discrimination : Kick + Devoice deux heures
+-----------------------+-----------------------------------+---------------------------------------+ - Spam : Kick + Devoice 1 jour + Ban 1/2 journée
| | Récidive d'infraction niveau stone | Kick + Ban 4 jours + devoice 5 jours |
| Niveau MESE | Contenu à caractère sexuel | Kick + Ban 1 semaine + devoice 5 jours | - Infraction niveau MESE :
| | Irrespect envers l'équipe | Kick + Ban 10 jours + devoice 8 jours | - Récidive d'infraction niveau stone : Kick + Ban 4 jours + devoice 5 jours
+-----------------------+-----------------------------------+---------------------------------------+ - Diffusion de contenu à caractère sexuel : Kick + Ban 1 semaine + devoice 5 jours
| | Récidive d'infraction niveau mese | Kick + Ban 1 mois + devoice 2 semaines | - Irrespect envers l'équipe du canal : Kick + Ban 10 jours + devoice 8 jours
| Niveau OBSIDIAN | Violation des lois en vigueur | Kick + Ban définitif + Gline |
| | Violation des règles d'InchraNet | Kick + Ban définitif + Gline | - Infraction niveau OBSIDIAN :
+-----------------------+-----------------------------------+---------------------------------------+ - Récidive d'infraction niveau mese : Kick + Ban 1 mois + devoice 2 semaines
- Violation des lois en vigueur : Kick + Ban définitif + Gline si accord des IrcOP d'InchraNet
- Violation des règles d'InchraNet : Kick + Ban définitif + Gline ou sanction défnie par l'équipe d'InchraNet
Autres règles de bienséances : Autres règles de bienséances :
- Ne demandez pas à faire partie des opérateurs/semi-opérateurs du canal. - Ne demandez pas à faire partie des opérateurs/semi-opérateurs du canal.

View File

@ -127,8 +127,8 @@ function add_falling_protect_item(named)
if minetest.is_protected(pointed_thing.above, pn) then if minetest.is_protected(pointed_thing.above, pn) then
return itemstack return itemstack
end end
minetest.env:add_node(pointed_thing.above, {name=itemstack:get_name()}) minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.env:get_meta(pointed_thing.above) local meta = minetest.get_meta(pointed_thing.above)
meta:set_string("owner", pn) meta:set_string("owner", pn)
nodeupdate(pointed_thing.above) nodeupdate(pointed_thing.above)
if not minetest.setting_getbool("creative_mode") then if not minetest.setting_getbool("creative_mode") then
@ -169,7 +169,7 @@ function add_protected_bukket_liquid(nameofbukket,liquidsourcename)
return return
end end
-- Check if pointing to a buildable node -- Check if pointing to a buildable node
n = minetest.env:get_node(pointed_thing.under) n = minetest.get_node(pointed_thing.under)
if is_protected_area(pointed_thing.under, 7 ,user:get_player_name()) then if is_protected_area(pointed_thing.under, 7 ,user:get_player_name()) then
minetest.chat_send_player(user:get_player_name(),"You cant place here - Too short of a protected area.") minetest.chat_send_player(user:get_player_name(),"You cant place here - Too short of a protected area.")
@ -182,14 +182,14 @@ function add_protected_bukket_liquid(nameofbukket,liquidsourcename)
if minetest.registered_nodes[n.name].buildable_to then if minetest.registered_nodes[n.name].buildable_to then
-- buildable; replace the node -- buildable; replace the node
minetest.log("action", user:get_player_name().. " use "..nameofbukket.." at ".. minetest.pos_to_string(pointed_thing.under)) minetest.log("action", user:get_player_name().. " use "..nameofbukket.." at ".. minetest.pos_to_string(pointed_thing.under))
minetest.env:add_node(pointed_thing.under, {name=liquidsourcename}) minetest.add_node(pointed_thing.under, {name=liquidsourcename})
else else
-- not buildable to; place the liquid above -- not buildable to; place the liquid above
-- check if the node above can be replaced -- check if the node above can be replaced
n = minetest.env:get_node(pointed_thing.above) n = minetest.get_node(pointed_thing.above)
if minetest.registered_nodes[n.name].buildable_to then if minetest.registered_nodes[n.name].buildable_to then
minetest.log("action", user:get_player_name().. " use "..nameofbukket.." at ".. minetest.pos_to_string(pointed_thing.above)) minetest.log("action", user:get_player_name().. " use "..nameofbukket.." at ".. minetest.pos_to_string(pointed_thing.above))
minetest.env:add_node(pointed_thing.above, {name=liquidsourcename}) minetest.add_node(pointed_thing.above, {name=liquidsourcename})
else else
-- do not remove the bucket with the liquid -- do not remove the bucket with the liquid
return return

View File

@ -143,8 +143,8 @@ minetest.override_item("default:lava_source", {
if minetest.is_protected(pointed_thing.above, pn) then if minetest.is_protected(pointed_thing.above, pn) then
return itemstack return itemstack
end end
minetest.env:add_node(pointed_thing.above, {name=itemstack:get_name()}) minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.env:get_meta(pointed_thing.above) local meta = minetest.get_meta(pointed_thing.above)
meta:set_string("owner", pn) meta:set_string("owner", pn)
nodeupdate(pointed_thing.above) nodeupdate(pointed_thing.above)
if not minetest.setting_getbool("creative_mode") then if not minetest.setting_getbool("creative_mode") then
@ -163,8 +163,8 @@ minetest.override_item("default:lava_flowing", {
if minetest.is_protected(pointed_thing.above, pn) then if minetest.is_protected(pointed_thing.above, pn) then
return itemstack return itemstack
end end
minetest.env:add_node(pointed_thing.above, {name=itemstack:get_name()}) minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.env:get_meta(pointed_thing.above) local meta = minetest.get_meta(pointed_thing.above)
meta:set_string("owner", pn) meta:set_string("owner", pn)
nodeupdate(pointed_thing.above) nodeupdate(pointed_thing.above)
if not minetest.setting_getbool("creative_mode") then if not minetest.setting_getbool("creative_mode") then
@ -181,7 +181,7 @@ if PROTECT_LAVA_REALTIME == 1 then
interval = 1, interval = 1,
chance = 1, chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider) action = function(pos, node, active_object_count, active_object_count_wider)
local meta = minetest.env:get_meta(pos) local meta = minetest.get_meta(pos)
if meta:get_string("owner") ~= nil and minetest.is_protected(pos, meta:get_string("owner")) then if meta:get_string("owner") ~= nil and minetest.is_protected(pos, meta:get_string("owner")) then
minetest.add_node(pos,{name="air"}) minetest.add_node(pos,{name="air"})
end end
@ -196,7 +196,7 @@ if PROTECT_WATER_REALTIME == 1 then
interval = 1, interval = 1,
chance = 1, chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider) action = function(pos, node, active_object_count, active_object_count_wider)
local meta = minetest.env:get_meta(pos) local meta = minetest.get_meta(pos)
if meta:get_string("owner") ~= nil and minetest.is_protected(pos, meta:get_string("owner")) then if meta:get_string("owner") ~= nil and minetest.is_protected(pos, meta:get_string("owner")) then
minetest.add_node(pos,{name="air"}) minetest.add_node(pos,{name="air"})
end end