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.",
-- privs = {shout=true},
-- 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!")
-- player:setpos({x=0.0, y=5.0, z=0.0})
-- return true
@ -97,7 +97,7 @@ minetest.register_chatcommand("sethome", {
description = "Set your home location.",
privs = {shout=true},
func = function(name, param)
player = minetest.env:get_player_by_name(name)
player = minetest.get_player_by_name(name)
test = player:getpos()
local file = io.open(minetest.get_worldpath().."/home/"..player:get_player_name().."_home", "w")
if not file then
@ -116,7 +116,7 @@ minetest.register_chatcommand("home", {
description = "Vous teleporte a l'emplacement de votre 'home'.",
privs = {shout=true},
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")
if not file then
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.")
return
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.")
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.
Voici les sanctions prévues pour les infractions aux règles ci-dessus.
+-----------------------+-----------------------------------+---------------------------------------+
| Niveau d'infraction : | Infraction(s) commise(s) : | Sanctions appliquées : |
| | Manque de respect enver autrui | Devoice une demi-journée |
| Niveau DIRT | Provocation envers autrui | Devoie une journée |
| | Insultes envers autrui | Kick + devoice une journée |
+-----------------------+-----------------------------------+---------------------------------------+
| | Récidive d'infraction niveau dirt | Kick + Ban 1/2 journée |
| Niveau STONE | 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 |
| | Irrespect envers l'équipe | Kick + Ban 10 jours + devoice 8 jours |
+-----------------------+-----------------------------------+---------------------------------------+
| | Récidive d'infraction niveau mese | Kick + Ban 1 mois + devoice 2 semaines |
| 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 DIRT :
Manque de respect envers autrui : Devoice une journée
Provocation envers autrui : Devoice une journée
Insultes envers autrui : Kick + Devoice une journée
- Infraction niveau STONE :
- Récidivide d'infraction niveau dirt : Kick + Ban 1/2 journée
- Flood, Discrimination : Kick + Devoice deux heures
- Spam : Kick + Devoice 1 jour + Ban 1/2 journée
- Infraction niveau MESE :
- 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
- Irrespect envers l'équipe du canal : Kick + Ban 10 jours + devoice 8 jours
- 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 :
- 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
return itemstack
end
minetest.env:add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.env:get_meta(pointed_thing.above)
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.get_meta(pointed_thing.above)
meta:set_string("owner", pn)
nodeupdate(pointed_thing.above)
if not minetest.setting_getbool("creative_mode") then
@ -169,7 +169,7 @@ function add_protected_bukket_liquid(nameofbukket,liquidsourcename)
return
end
-- 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
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
-- buildable; replace the node
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
-- not buildable to; place the liquid above
-- 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
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
-- do not remove the bucket with the liquid
return

View File

@ -143,8 +143,8 @@ minetest.override_item("default:lava_source", {
if minetest.is_protected(pointed_thing.above, pn) then
return itemstack
end
minetest.env:add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.env:get_meta(pointed_thing.above)
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.get_meta(pointed_thing.above)
meta:set_string("owner", pn)
nodeupdate(pointed_thing.above)
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
return itemstack
end
minetest.env:add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.env:get_meta(pointed_thing.above)
minetest.add_node(pointed_thing.above, {name=itemstack:get_name()})
local meta = minetest.get_meta(pointed_thing.above)
meta:set_string("owner", pn)
nodeupdate(pointed_thing.above)
if not minetest.setting_getbool("creative_mode") then
@ -181,7 +181,7 @@ if PROTECT_LAVA_REALTIME == 1 then
interval = 1,
chance = 1,
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
minetest.add_node(pos,{name="air"})
end
@ -196,7 +196,7 @@ if PROTECT_WATER_REALTIME == 1 then
interval = 1,
chance = 1,
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
minetest.add_node(pos,{name="air"})
end