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

Delete _misc and u_skins

This commit is contained in:
Ombridride 2014-11-08 23:19:46 +01:00
parent 83f78aea2f
commit 7430cdabe9
950 changed files with 0 additions and 2238 deletions

View File

@ -1,19 +0,0 @@
-- Remove stone_with_tin from default carbone subgame => virer doublon minerais brutes
minetest.register_alias("default:stone_with_tin", "default:stone")
minetest.register_alias("default:stone_with_silver", "default:stone")
-- Remove lump from default carbone subgame => virer doublon minerais
minetest.register_alias("default:tin_lump", "default:stone")
minetest.register_alias("default:silver_lump", "default:stone")
-- Remove ingot from default carbone subgame => virer doublon lingots
minetest.register_alias("default:tin_ingot", "default:stone")
minetest.register_alias("default:silver_ingot", "default:stone")
-- Remove torch from torches => remise des torches par défaut
minetest.register_alias("torches:floor", "default:torch")
minetest.register_alias("torches:wand", "default:torch")
-- Remove copper_rail from moreores => utilisation des rail_copper du mod carts
minetest.register_alias("moreores:copper_rail", "carts:rail_copper")

View File

@ -1,63 +0,0 @@
future_ban_list = {}
local file = io.open(minetest.get_worldpath().."/future_banlist.txt", "r")
if file then
future_ban_list = minetest.deserialize(file:read("*all"))
file:close()
if not future_ban_list then
future_ban_list = {}
end
end
local function save_file()
local file = io.open(minetest.get_worldpath().."/future_banlist.txt", "w")
if file then
file:write(minetest.serialize(future_ban_list))
file:close()
end
end
minetest.register_chatcommand("future_ban", {
params = "<playername> | leave playername out to see the future ban list",
description = "The player will be banned when trying to join",
privs = {ban=true},
func = function(name, param)
if param == "" then
minetest.chat_send_player(name, "Future ban list: " .. dump(future_ban_list))
return
end
if not minetest.get_player_by_name(param) then
table.insert(future_ban_list, param)
minetest.chat_send_player(name, param .. " to future ban list added.")
minetest.log("action", name .. " added " .. param .. " to future ban list.")
save_file()
return
end
if not minetest.ban_player(param) then
table.insert(future_ban_list, param)
minetest.chat_send_player(name, desc .. " to future ban list added.")
minetest.log("action", name .. " added " .. desc .. " to future ban list.")
save_file()
else
local desc = minetest.get_ban_description(param)
minetest.chat_send_player(name, "Banned " .. desc .. ".")
minetest.log("action", name .. " bans " .. desc .. ".")
end
end
})
minetest.register_on_joinplayer(function(player)
local name = player:get_player_name()
for i,n in ipairs(future_ban_list) do
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)
save_file()
end
end
end
end)

View File

@ -1,25 +0,0 @@
-- This allows me to chat and use basic commands without being in-game
-- Based on the External Command mod by Menche
minetest.register_globalstep(
function(dtime)
f = (io.open(minetest.get_worldpath("external_cmd").."/message", "r"))
if f ~= nil then
local message = f:read("*line")
f:close()
os.remove(minetest.get_worldpath("external_cmd").."/message")
if message ~= nil then
local cmd, param = string.match(message, "^/([^ ]+) *(.*)")
if not param then
param = ""
end
local cmd_def = minetest.chatcommands[cmd]
if cmd_def then
cmd_def.func("CraigyDavi", param)
else
minetest.chat_send_all("<CraigyDavi> "..message)
end
end
end
end
)

View File

@ -1,136 +0,0 @@
--
-- Edited chat commands from core
--
-- /me
-- /help
-- /privs
-- /grant
-- /revoke
-- /setpassword
-- /clearpassword
-- /auth_reload
-- /teleport
-- /set
-- /mods
-- /give
-- /giveme
-- /spawnentity
-- /pulverize
-- /rollback_check
-- /rollback
-- /status
minetest.register_chatcommand("time", {
params = "<0...24000>",
description = "set time of day",
privs = {settime=true},
func = function(name, param)
if param == "" then
return false, "Missing time."
end
local newtime = tonumber(param)
if newtime == nil then
return false, "Invalid time."
end
minetest.set_timeofday((newtime % 24000) / 24000)
minetest.log("action", name .. " sets time " .. newtime)
minetest.chat_send_all(name .. " changed the time of day.")
end,
})
minetest.register_chatcommand("shutdown", {
description = "shutdown server",
privs = {server=true},
func = function(name, param)
minetest.log("action", name .. " shuts down server")
minetest.request_shutdown()
minetest.chat_send_all(name .. " just shut down the server.")
end,
})
minetest.register_chatcommand("ban", {
params = "<name>",
description = "Ban IP of player",
privs = {ban=true},
func = function(name, param)
if param == "" then
return true, "Ban list: " .. minetest.get_ban_list()
end
if not minetest.get_player_by_name(param) then
return false, "This player is not online at the moment. Use a /future_ban instead."
end
if not minetest.ban_player(param) then
return false, "Failed to ban player."
end
local desc = minetest.get_ban_description(param)
minetest.log("action", name .. " bans " .. desc .. ".")
return true, "Banned " .. desc .. "."
end,
})
-- /unban
-- /kick
-- /clearobjects
-- /msg
--
-- Other chat commands
--
-- Spawn command
--minetest.register_chatcommand("spawn", {
-- params = "",
-- description = "Teleport to the spawn location.",
-- privs = {shout=true},
-- func = function(name, param)
-- 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
-- end,
--})
--[[
-- Sethome command
minetest.register_chatcommand("sethome", {
params = "",
description = "Set your home location.",
privs = {shout=true},
func = function(name, param)
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
minetest.chat_send_player(name, "Il y a eut une erreur, s'il vous plait contactez le detenteur du serveur.")
return
end
file:write(minetest.pos_to_string(test))
file:close()
minetest.chat_send_player(name, "Votre emplacement 'home' est definit ! Tapez /home pour vous y teleporter.")
end
})
-- Home command
minetest.register_chatcommand("home", {
params = "",
description = "Vous teleporte a l'emplacement de votre 'home'.",
privs = {shout=true},
func = function(name, param)
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.")
return
end
local line = file:read("*line")
file:close()
local pos = minetest.string_to_pos(string.sub(line, 1, string.find(line, ")")))
if not pos or type(pos) ~= "table" then
minetest.chat_send_player(name, "Il y a eut une erreur, s'il vous plait contactez le detenteur du serveur.")
return
end
minetest.:get_player_by_name(name):setpos(pos)
minetest.chat_send_player(name, "Vous voilà chez vous.")
end
})
--]]

View File

@ -1,15 +0,0 @@
local chatlog = minetest.get_worldpath().."/chatlog.txt"
monthfirst = true -- Wheter the 1st of Feb should be 1/2/13(monthfirst = true) or 2/1/13(monthfirst = false)
function playerspeak(name,msg)
f = io.open(chatlog, "a")
if monthfirst then
f:write(os.date("(%m/%d/%y %X) ["..name.."]: "..msg.."\n"))
else
f:write(os.date("(%d/%m/%y %X) ["..name.."]: "..msg.."\n"))
end
f:close()
end
minetest.register_on_chat_message(playerspeak)

View File

@ -1,10 +0,0 @@
-- Craft obsidian
minetest.register_craft({
output = "default:obsidian",
recipe = {
{"bucket:bucket_lava"},
},
replacements = {
{"bucket:bucket_lava", "bucket:bucket_empty"}
},
})

View File

@ -1,10 +0,0 @@
minetest.register_on_newplayer(function(player)
print("Un nouveau joueur vient de nous rejoindre !")
if minetest.setting_getbool("give_initial_stuff") then
print("Equipement de depart transmis")
player:get_inventory():add_item("main", "default:axe_wood")
player:get_inventory():add_item("main", "default:torch 10")
player:get_inventory():add_item("main", "default:sapling 2")
player:get_inventory():add_item("main", "default:apple 5")
end
end)

View File

@ -1,28 +0,0 @@
---------------------
-- Server Misc Mod --
---------------------
-- Give initial stuff
dofile(minetest.get_modpath("_misc").."/give_initial_stuff.lua")
-- Chat Commands
dofile(minetest.get_modpath("_misc").."/chatcommands.lua")
-- Rules
dofile(minetest.get_modpath("_misc").."/rules.lua")
-- No Interact Messages
dofile(minetest.get_modpath("_misc").."/nointeract_messages.lua")
-- irc
dofile(minetest.get_modpath("_misc").."/irc.lua")
-- No Shout Messages
dofile(minetest.get_modpath("_misc").."/noshout_messages.lua")
-- Aliases
dofile(minetest.get_modpath("_misc").."/aliases.lua")
-- Craft Obsidian
dofile(minetest.get_modpath("_misc").."/craft_obsidian.lua")
-- UnCraft Woll
dofile(minetest.get_modpath("_misc").."/uncraft_woll.lua")

View File

@ -1,84 +0,0 @@
# Based on https://github.com/ChaosWormz/mt_terms_of_use
local IRC = [[
-~= Règles du salon de chat IRC #minetestforfun@irc.inchra.net =~-
Ces règles ont é établies le 1er Novembre 2014 par Mg et MinetestForFun (opérateurs du canal)
1) Il ne sera toléré aucune transgressions aux règles du réseau InchraNet, sous peine de la sanction prévue par les administrateurs du réseau.
2) Il ne sera toléré aucune forme de violation des lois en vigueur dans les pays de résidence des participants, ainsi que ceux des hébergeurs des serveurs.
3) Il ne sera toléré aucune sorte d'insulte, de provocation gratuite, d'incitation à la haine, au meurtre, au suicide, ou toute autre forme d'atteinte au respect mutuel des utilisateurs de l'IRC.
4) Il ne sera toléré aucune forme de flood ainsi que de spam. Rappelez-vous qu'il est préférable d'utiliser un site de téléversion de texte (aussi nommé "pastebin"), tel que "pastebin.ubuntu.com" à chaque fois que vous désirez transmettre du code ou un long texte.
Le flood est l'action de saturer le chat de messages répétitifs, inutiles, y compris les join/part, grossiers, sans aucun rapport avec la conversation et au détriment des participants
Le spam est l'action de faire de la publicité pour quelque chose que ce soit sans l'accord d'un ayant droit ou d'un opérateur de canal.
5) Il ne sera toléré aucun pseudonyme à caractère sexuel, haineux, contenant des termes ou propos indésirables sur le salon.
6) Il ne sera toléré aucune forme d'harcèlement moral ou à caractère sexuel, y compris par messages privés.
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 |
+-----------------------+-----------------------------------+---------------------------------------+
Autres règles de bienséances :
- Ne demandez pas à faire partie des opérateurs/semi-opérateurs du canal.
- Attention, l'abus de query et msg est dangereux pour la santé.
- Inutile de faire étalage de votre vie privée si c'est hors contexte ou si personne n'est intéressé par celle ci.
- Nous ne sanctionnons bien évidemment pas le hors-sujet, toutefois, s'il est évitable ça ne peut quêtre toujours un plus !
- Le respect d'autrui est important à nos yeux.
- En cas de problème, n'hésitez pas à contacter le staff.
]]
local function make_formspec()
local size = { "size[10,8]" }
table.insert(size, "textarea[0.5,0.5;9.5,8;TOS;Voici les regles, cliquez sur Accepter si vous etes d'accord avec;"..IRC.."]")
table.insert(size, "button_exit[6,7.4;1.5,0.5;accept;J'accepte]")
table.insert(size, "button[7.5,7.4;1.5,0.5;decline;Je refuse]")
return table.concat(size)
end
minetest.register_on_player_receive_fields(function(player, formname, fields)
if formname ~= "irc" then return end
local name = player:get_player_name()
if fields.accept then
minetest.chat_send_player(name, "Merci d'avoir accepte les regles, vous etes maintenant capable de parler.")
minetest.chat_send_player(name, "Pour plus d'informations tapez /news")
local privs = minetest.get_player_privs(name)
privs.shout = true
minetest.set_player_privs(name, privs)
--end
return
elseif fields.decline then
minetest.kick_player(name, "Aurevoir ! Vous devez accepter les règles de l'irc pour jouer sur le serveur (revennez si vous changez d'avis).")
return
end
end)
minetest.register_chatcommand("irc",{
params = "",
description = "Montre les regles de l'irc",
privs = {spawn=true},
func = function (name,params)
local player = minetest.get_player_by_name(name)
minetest.after(1, function()
minetest.show_formspec(name, "irc", make_formspec())
end)
end
})

View File

@ -1,48 +0,0 @@
local news = {}
news.path = minetest.get_worldpath()
function news.formspec(player,article)
if ( article == "" or article == nil ) then
article = "news.txt"
else
article = "news_"..article..".txt"
end
local newsfile = io.open(news.path.."/"..article,"r")
local formspec = "size[12,10]"
if newsfile ~= nil then
local newscontent = newsfile:read("*a")
formspec = formspec.."textarea[.25,.25;12,10;news;;"..newscontent.."]"
else
formspec = formspec.."label[.25,.25;Article does not exist]"
end
formspec = formspec.."button_exit[.25,9;2,1;exit;Fermer"
if ( newsfile ~= nil ) then
newsfile:close()
end
return formspec
end
function news.show_formspec(player)
local name = player:get_player_name()
minetest.show_formspec(name,"news",news.formspec(player))
minetest.log('action','Showing formspec to '..name)
end
minetest.register_chatcommand("news",{
params = "<article>",
description="Montre les news du serveur",
func = function (name,params)
local player = minetest.get_player_by_name(name)
minetest.show_formspec(name,"news",news.formspec(player,params))
end,
})
minetest.register_on_joinplayer(function (player)
minetest.after(5,news.show_formspec,player)
end)

View File

@ -1,53 +0,0 @@
local wield={}
local huds={}
local dtimes={}
local dlimit=60
local airhudmod = minetest.get_modpath("4air")
local function get_desc(item)
if minetest.registered_nodes[item] then return minetest.registered_nodes[item]["description"] end
if minetest.registered_items[item] then return minetest.registered_items[item]["description"] end
if minetest.registered_craftitems[item] then return minetest.registered_craftitems[item]["description"] end
if minetest.registered_tools[item] then return minetest.registered_tools[item]["description"] end
return ""
end
minetest.register_globalstep(function(dtime)
local players = minetest.get_connected_players()
for i,player in ipairs(players) do
local pll = player:get_player_name()
local wstack = player:get_wielded_item():get_name()
local shift = player:get_player_control()['sneak']
local meta = player:get_wielded_item():get_metadata()
local desc
if not shift then
desc = wstack
else
desc = wstack
end
if dtimes[pll] then dtimes[pll]=dtimes[pll]+dtime else dtimes[pll]=0 end
if dtimes[pll]>dlimit then
if huds[pll] then player:hud_remove(huds[pll]) end
dtimes[pll]=dlimit+1
end
if wstack ~= wield[pll] then
wield[pll]=wstack
dtimes[pll]=0
if huds[pll]
then
player:hud_remove(huds[pll])
end
local off = {x=0, y=-70}
if airhudmod then off.y=off.y-20 end
huds[pll] = player:hud_add({
hud_elem_type = "text",
position = {x=0.5, y=1},
offset = off,
alignment = {x=0, y=0},
number = 0xFFFFFF ,
text = desc,
})
end
end
end)

View File

@ -1,12 +0,0 @@
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
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.")
end
end
end)

View File

@ -1,12 +0,0 @@
local TIMER = 0
minetest.register_globalstep(function(dtime)
TIMER = TIMER + dtime
if TIMER < 25 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
minetest.chat_send_player(name, "Hey " .. name .. " ! Pour pouvoir communiquer avec les autres joueurs sur ce serveur, tu dois lire les règles de l'irc et les accepter. Tape /irc.")
end
end
end)

View File

@ -1,55 +0,0 @@
# Based on https://github.com/ChaosWormz/mt_terms_of_use
local RULES = [[
Voici les règles :
1) Aucune atteinte intentionnelle au bon fonctionnement du serveur ne sera admise. (lag, crash, exploit de bug, etc...)
2) La triche (hack, client modifié, etc...) n'est pas tolérée sur le serveur. Soyez fair-play et apprenez à jouer selon les règles.
3) Sur le serveur, le PVP est autorisé, le vole/grief est aussi autorisé. (pensez au mod areas pour protéger vos biens)
4) Merci de ne pas spammer ou flooder.
5) Chaque joueur à l'entière responsabilité de son compte, nous ne sommes en aucun cas responsable d'une utilisation frauduleuse de votre compte dans le jeu.
6) Si possible, évitez les constructions de tours en 1x1 et, poser des blocs gâchant le décor n'importe ou. Ceci pour que le serveur reste le plus beau, sauvage et naturel possibe.
7) Ne demandez pas à être membre de l'equipe du serveur.
8) Aucune forme d'insulte ou de racisme n'est admise.
Cliquez sur le bouton "Accepter" pour pouvoir construire et intéragir sur le serveur.
]]
local function make_formspec()
local size = { "size[10,8]" }
table.insert(size, "textarea[0.5,0.5;9.5,8;TOS;Voici les regles, cliquez sur Accepter si vous etes d'accord avec;"..RULES.."]")
table.insert(size, "button_exit[6,7.4;1.5,0.5;accept;J'accepte]")
table.insert(size, "button[7.5,7.4;1.5,0.5;decline;Je refuse]")
return table.concat(size)
end
minetest.register_on_player_receive_fields(function(player, formname, fields)
if formname ~= "rules" then return end
local name = player:get_player_name()
if fields.accept then
if minetest.check_player_privs(name, {shout=true}) then
minetest.chat_send_player(name, "Merci d'avoir accepte les regles, vous etes maintenant capable de construire et d'interagir avec le serveur.")
minetest.chat_send_player(name, "Amusez vous bien a survivre et construire !")
minetest.chat_send_player(name, "Pour plus d'informations tapez /news")
local privs = minetest.get_player_privs(name)
privs.interact = true
minetest.set_player_privs(name, privs)
end
return
elseif fields.decline then
minetest.kick_player(name, "Aurevoir ! Vous devez accepter les règles pour jouer sur le serveur (revennez si vous changez d'avis).")
return
end
end)
minetest.register_chatcommand("rules",{
params = "",
description = "Montre les regles du serveur",
privs = {shout=true},
func = function (name,params)
local player = minetest.get_player_by_name(name)
minetest.after(1, function()
minetest.show_formspec(name, "rules", make_formspec())
end)
end
})

View File

@ -1,211 +0,0 @@
seendebug = true
local last_time = os.time()
local save_interval = 60
if minetest.setting_get("seen.save_interval") ~= nil then
local save_int = minetest.setting_get("seen.save_interval")
if tonumber(save_int) > 20 then
save_interval = save_int
end
end
local function save_data(sett, data)
if sett ~= nil then
data_ser = minetest.serialize(data)
sett:set("data", data_ser)
sett:write()
else
minetest.chat_send_all("Seen Mod: Saving data failed. Please shout at the server admin!")
end
end
local function load_data(sett, field)
local loaded = sett:get("data")
local def = sett:get("default")
if loaded ~= nil then
local data = minetest.deserialize(loaded)
else
local data = {}
end
end
local function relative_time (time)
local diff = os.time() - time
if diff == 0 then
return "now"
elseif diff > 0 then
local day_diff = math.floor(diff/86400)
if day_diff == 0 then
if diff < 60 then
return "a few seconds ago"
end
if diff < 120 then
return "1 minute ago."
end
if diff < 3600 then
return tostring(math.floor(diff/60)).." minutes ago"
end
if diff < 7200 then
return "1 hour ago"
end
if diff < 86400 then
return tostring(math.floor(diff/3600)).." hours ago"
end
end
if day_diff == 1 then
return "yesterday"
end
if day_diff < 7 then
return tostring(day_diff).." days ago"
end
if day_diff < 31 then
return tostring(math.ceil(day_diff/7)).." weeks ago"
end
if day_diff < 60 then
return "last month"
end
return os.date("%B %Y", time)
else
local diff = math.abs(diff)
local day_diff = math.floor(diff/86400)
if day_diff == 0 then
if diff < 120 then
return "in a minute"
end
if diff < 3600 then
return "in "..tostring(math.floor(diff/60)).." minutes"
end
if diff < 7200 then
return "in an hour"
end
if diff < 86400 then
return "in "..tostring(math.floor(diff/3600)).." hours"
end
end
if day_diff == 1 then
return "tomorrow"
end
if day_diff < 4 then
return os.date("%A", time)
end
if day_diff < 7 + (7 - tonumber(os.date("%w"))) then
return "next week"
end
if math.ceil (day_diff / 7) < 4 then
return "in "..tostring(math.ceil(day_diff/7)).." weeks"
end
if tonumber(os.date("%m", time)) == tonumber(os.date("%m")) + 1 then
return "next month"
end
return os.date("%B %Y", time);
end
end
local function print_r(tab,com)
if seendebug == true then
print("DEBUG: "..com)
table.foreach(tab, print)
print("-----")
return true
else
return false
end
end
local function debug(var, com)
if seendebug == true then
print("DEBUG: "..com)
print(var)
minetest.chat_send_all("DEBUG: "..var.."// "..com)
print("-----")
return true
else
return false
end
end
local config_file = minetest.get_worldpath().."/seen.txt"
--in case of not existant config file, it
--will create it
local file_desc = io.open(config_file, "a")
file_desc:close()
--create config instance
local config = Settings(config_file)
local data
local seens = {}
data = config:get("data")
if data ~= nil then
seens = minetest.deserialize(data)
for _, player in pairs( minetest.get_connected_players() ) do
name = player:get_player_name()
seens[name] = os.time()
end
else
seens = {}
for _, player in pairs( minetest.get_connected_players() ) do
name = player:get_player_name()
seens[name] = os.time()
end
end
save_data(config, seens)
minetest.register_on_newplayer(function(player)
name = player:get_player_name()
seens[name] = os.time()
save_data(config, seens)
return true
end)
minetest.register_on_joinplayer(function(player)
name = player:get_player_name()
seens[name] = os.time()
save_data(config, seens)
return true
end)
minetest.register_on_leaveplayer(function(player)
name = player:get_player_name()
seens[name] = os.time()
save_data(config, seens)
return true
end)
minetest.register_on_shutdown(function()
for _, player in pairs( minetest.get_connected_players() ) do
name = player:get_player_name()
seens[name] = os.time()
end
save_data(config, seens)
return true
end)
minetest.register_globalstep(function ( dtime )
if os.time() >= last_time then
last_time = os.time() + save_interval
for _, player in pairs( minetest.get_connected_players() ) do
name = player:get_player_name()
seens[name] = os.time()
end
save_data(config, seens)
end
end);
minetest.register_chatcommand("seen", {
params = "<name>",
description = "Recherche quand un joueur etait en ligne pour la derniere fois.",
func = function(name, param)
local player = minetest.get_player_by_name(name)
if not player then
return
end
if param ~= nil and param ~= "" then
if seens[param] ~= nil then
minetest.chat_send_player(name, param.." etait en ligne pour la derniere fois "..relative_time(seens[param]))
else
minetest.chat_send_player(name, "Il n'y a aucune donnees sur "..param..". Peut-etre que l'identifiant n'est pas correcte ?")
end
end
end,
})

View File

@ -1,119 +0,0 @@
-- récupéré les "cotton" des "wool" faite (récupère 3 aulieu de 4 et perte du colorant)
minetest.register_craft({
output = "farming:cotton 3",
recipe = {
{"wool:black"},
},
})
minetest.register_craft({
output = "farming:cotton 3",
recipe = {
{"wool:white"},
},
})
minetest.register_craft({
output = "farming:cotton 3",
recipe = {
{"wool:grey"},
},
})
minetest.register_craft({
output = "farming:cotton 3",
recipe = {
{"wool:dark_grey"},
},
})
minetest.register_craft({
output = "farming:cotton 3",
recipe = {
{"wool:blue"},
},
})
minetest.register_craft({
output = "farming:cotton 3",
recipe = {
{"wool:brown"},
},
})
minetest.register_craft({
output = "farming:cotton 3",
recipe = {
{"wool:cyan"},
},
})
minetest.register_craft({
output = "farming:cotton 3",
recipe = {
{"wool:green"},
},
})
minetest.register_craft({
output = "farming:cotton 3",
recipe = {
{"wool:dark_green"},
},
})
minetest.register_craft({
output = "farming:cotton 3",
recipe = {
{"wool:dark_grey"},
},
})
minetest.register_craft({
output = "farming:cotton 3",
recipe = {
{"wool:dark_grey"},
},
})
minetest.register_craft({
output = "farming:cotton 3",
recipe = {
{"wool:magenta"},
},
})
minetest.register_craft({
output = "farming:cotton 3",
recipe = {
{"wool:orange"},
},
})
minetest.register_craft({
output = "farming:cotton 3",
recipe = {
{"wool:pink"},
},
})
minetest.register_craft({
output = "farming:cotton 3",
recipe = {
{"wool:red"},
},
})
minetest.register_craft({
output = "farming:cotton 3",
recipe = {
{"wool:violet"},
},
})
minetest.register_craft({
output = "farming:cotton 3",
recipe = {
{"wool:yellow"},
},
})

View File

@ -1,34 +0,0 @@
-- By VanessaE, sfan5, and kaeza.
local disallowed = {
["guest"] = "Les comptes Guest/invités sont désactivés sur ce serveur. "..
"S'il vous plaît, choisissez un nom d'utilisateur correcte et réessayez.",
["^[0-9]+$"] = "Les identifiants contenant uniquement des chiffres sont désactivés sur ce serveur. "..
"S'il vous plaît, choisissez un nom d'utilisateur correcte et réessayez.",
["[0-9].-[0-9].-[0-9].-[0-9].-[0-9]"] = "Trop de chiffres dans votre identifiant. "..
"S'il vous plaît, réessayez avec moins de 5 chiffres dans votre identifiant.",
["[4a]dm[1il]n"] = "Ce nom d'utilisateur est désactivé pour des raisons évidentes. "..
"Merci de choisir un autre nom d'utilisateur."
}
minetest.register_on_prejoinplayer(function(name, ip)
local lname = name:lower()
for re, reason in pairs(disallowed) do
if lname:find(re) then
return reason
end
end
if #name < 2 then
return "Identifiant trop court. "..
"S'il vous plaît, choisissez un identifiant avec au moins 2 lettres et réessayez."
end
if #name > 18 then
return "Identifiant trop long. "..
"S'il vous plaît, choisissez un identifiant avec moins de 18 caractères."
end
end)

Binary file not shown.

Binary file not shown.

View File

@ -1,28 +0,0 @@
minetest-u_skins
================
An skin extention for the Minetest mod unified_inventory by Dean Montgomery
It downloads the skins from the Minetest skin database. (http://minetest.fensta.bplaced.net)
Requires latest unified_inventory from:
https://github.com/minetest-technic/unified_inventory
To download the latest skins you need to run:
"./update_from_db.py" OR
the win32.NET client
Licenses:
--------
cornernote:
Lua source code (GPLv3)
Fritigern:
update_skins_db.sh (CC-BY-NC-SA 4.0)
Krock:
Lua source code (GPLv3)
MT_skins_updater.exe (WTFPL)
Credits:
--------
RealyBadAngel unified_inventory and Zeg9 skinsdb

View File

@ -1,2 +0,0 @@
unified_inventory
default

View File

@ -1,165 +0,0 @@
-- Unified Skins for Minetest - based modified Bags from unfied_inventory and skins from inventory_plus
-- Copyright (c) 2012 cornernote, Dean Montgomery
-- License: GPLv3
u_skins = {}
u_skins.modpath = minetest.get_modpath("u_skins")
u_skins.file = minetest.get_worldpath().."/u_skins.mt"
u_skins.default = "character_1"
u_skins.pages = {}
u_skins.u_skins = {}
u_skins.file_save = false
-- ( Deprecated
u_skins.type = { SPRITE=0, MODEL=1, ERROR=99 }
u_skins.get_type = function(texture)
if not u_skins.is_skin(texture) then
return u_skins.type.ERROR
end
return u_skins.type.MODEL
end
-- )
u_skins.is_skin = function(texture)
if not texture then
return false
end
if not u_skins.meta[texture] then
return false
end
return true
end
dofile(u_skins.modpath.."/skinlist.lua")
dofile(u_skins.modpath.."/players.lua")
u_skins.update_player_skin = function(player)
local name = player:get_player_name()
if not u_skins.is_skin(u_skins.u_skins[name]) then
u_skins.u_skins[name] = u_skins.default
end
player:set_properties({
textures = {u_skins.u_skins[name]..".png"},
})
u_skins.file_save = true
end
-- Display Current Skin
unified_inventory.register_page("u_skins", {
get_formspec = function(player)
local name = player:get_player_name()
if not u_skins.is_skin(u_skins.u_skins[name]) then
u_skins.u_skins[name] = u_skins.default
end
local formspec = ("background[0.06,0.99;7.92,7.52;ui_misc_form.png]"
.."image[0,.75;1,2;"..u_skins.u_skins[name].."_preview.png]"
.."label[6,.5;Raw texture:]"
.."image[6,1;2,1;"..u_skins.u_skins[name]..".png]")
local meta = u_skins.meta[u_skins.u_skins[name]]
if meta then
if meta.name ~= "" then
formspec = formspec.."label[2,.5;Name: "..minetest.formspec_escape(meta.name).."]"
end
if meta.author ~= "" then
formspec = formspec.."label[2,1;Author: "..minetest.formspec_escape(meta.author).."]"
end
if meta.license ~= "" then
formspec = formspec.."label[2,1.5;License: "..minetest.formspec_escape(meta.license).."]"
end
if meta.description ~= "" then --what's that??
formspec = formspec.."label[2,2;Description: "..minetest.formspec_escape(meta.description).."]"
end
end
local page = 0
if u_skins.pages[name] then
page = u_skins.pages[name]
end
formspec = formspec .. "button[.75,3;6.5,.5;u_skins_page$"..page..";Change]"
return {formspec=formspec}
end,
})
unified_inventory.register_button("u_skins", {
type = "image",
image = "u_skins_button.png",
})
-- Create all of the skin-picker pages.
u_skins.generate_pages = function(texture)
local page = 0
local pages = {}
for i, skin in ipairs(u_skins.list) do
local p_index = (i - 1) % 16
if p_index == 0 then
page = page + 1
pages[page] = {}
end
pages[page][p_index + 1] = {i, skin}
end
local total_pages = page
page = 1
for page, arr in ipairs(pages) do
local formspec = "background[0.06,0.99;7.92,7.52;ui_misc_form.png]"
local y = -0.1
for i, skin in ipairs(arr) do
local x = (i - 1) % 8
if i > 1 and x == 0 then
y = 1.8
end
formspec = (formspec.."image_button["..x..","..y..";1,2;"
..skin[2].."_preview.png;u_skins_set$"..skin[1]..";]")
end
local page_prev = page - 2
local page_next = page
if page_prev < 0 then
page_prev = total_pages - 1
end
if page_next >= total_pages then
page_next = 0
end
formspec = (formspec
.."button[0,3.8;1,.5;u_skins_page$"..page_prev..";<<]"
.."button[.75,3.8;6.5,.5;u_skins_null;Page "..page.."/"..total_pages.."]"
.."button[7,3.8;1,.5;u_skins_page$"..page_next..";>>]")
unified_inventory.register_page("u_skins_page$"..(page - 1), {
get_formspec = function(player)
return {formspec=formspec}
end
})
end
end
-- click button handlers
minetest.register_on_player_receive_fields(function(player, formname, fields)
if fields.u_skins then
unified_inventory.set_inventory_formspec(player, "craft")
return
end
for field, _ in pairs(fields) do
local current = string.split(field, "$", 2)
if current[1] == "u_skins_set" then
u_skins.u_skins[player:get_player_name()] = u_skins.list[tonumber(current[2])]
u_skins.update_player_skin(player)
unified_inventory.set_inventory_formspec(player, "u_skins")
elseif current[1] == "u_skins_page" then
u_skins.pages[player:get_player_name()] = current[2]
unified_inventory.set_inventory_formspec(player, "u_skins_page$"..current[2])
end
end
end)
-- Change skin on join - reset if invalid
minetest.register_on_joinplayer(function(player)
local player_name = player:get_player_name()
if not u_skins.is_skin(u_skins.u_skins[player_name]) then
u_skins.u_skins[player_name] = u_skins.default
end
u_skins.update_player_skin(player)
end)
u_skins.generate_pages()
u_skins.load_players()

View File

@ -1,3 +0,0 @@
Sam 0
Jordach
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
Tuxedo Sam
Jordach
CC BY-NC-SA 3.0

View File

@ -1,3 +0,0 @@
Emma
Cidney7760
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
Wants
Wants
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
villiantest III
marshrover
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
Geopbyte
Geopbyte
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
Diamond Armor Sam
Block_Guy
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
Hobo/Homeless person
Minetestian
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
Block_Guy
Block_Guy
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
Solid-Color Sam
Block_Guy
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
RockerLuke skin
RockerLuke
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
Diamond Armor Sam
Block_Guy
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
Semmett9
Infinatum
CC BY-NC-SA 3.0

View File

@ -1,3 +0,0 @@
Molten Elemental
Dunedubby
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
herobrine
Zaki
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
Link
tux_peng
CC BY-NC-SA 3.0

View File

@ -1,3 +0,0 @@
Saris
Gfiti
CC BY-NC-SA 3.0

View File

@ -1,3 +0,0 @@
Malon
SummerCampV
CC BY-NC-SA 3.0

View File

@ -1,3 +0,0 @@
Froggy
Linxx
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
Bob
LuxAtheris
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
Naruto
LuxAtheris
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
Alien
jmf
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
manoel1500
manoel1500
CC BY-NC-SA 3.0

View File

@ -1,3 +0,0 @@
Vile Sam
philipbenr
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
BlueZ Sam II
philipbenr
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
Tetra
philipbenr
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
AMMOnym
AMMOnym
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
Soldier
Ragnar
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
TestManiac
AMMOnym
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
HurtedOerkki
AMMOnym
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
S"am"TEVE
AMMOnym
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
Samerkki
AMMOnym
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
Calinou
Calinou
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
Black
Calinou
CC BY 4.0

View File

@ -1,3 +0,0 @@
SuperSam
AMMOnym
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
TrollSam
AMMOnym
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
HungrySteve
AMMOnym
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
ShadowNinja
ShadowNinja
CC BY-SA 4.0

View File

@ -1,3 +0,0 @@
Minetestian
Minetestian
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
lordphoenixmh
lordphoenixmh
CC BY 4.0

View File

@ -1,3 +0,0 @@
Ladyvioletkitty
lordphoenixmh
CC BY 4.0

View File

@ -1,3 +0,0 @@
4°district
Ferdi Napoli
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
Chop
Ferdi Napoli
CC BY-NC-SA 3.0

View File

@ -1,3 +0,0 @@
Franklin
Ferdi Napoli
CC BY-NC-SA 3.0

View File

@ -1,3 +0,0 @@
Trevor
Ferdi Napoli
CC BY-NC-SA 3.0

View File

@ -1,3 +0,0 @@
Bart Simpson
Ferdi Napoli
CC BY-NC-SA 3.0

View File

@ -1,3 +0,0 @@
Creeper
Ferdi Napoli
CC BY-NC-SA 3.0

View File

@ -1,3 +0,0 @@
War Machine
Ferdi Napoli
CC BY-NC-SA 3.0

View File

@ -1,3 +0,0 @@
Gangnam Style
Ferdi Napoli
CC BY-NC-SA 3.0

View File

@ -1,3 +0,0 @@
Sonic The Hedgehog
Ferdi Napoli
CC BY-NC-SA 3.0

View File

@ -1,3 +0,0 @@
Charizard
Ferdi Napoli
CC BY-NC-SA 3.0

View File

@ -1,3 +0,0 @@
Scarlet Spider-man
Ferdi Napoli
CC BY-NC-SA 3.0

View File

@ -1,3 +0,0 @@
Ferdi Napoli
Ferdi Napoli
CC BY-NC-SA 3.0

View File

@ -1,3 +0,0 @@
Finn The Adventured
Ferdi Napoli
CC BY-NC-SA 3.0

View File

@ -1,3 +0,0 @@
Jake
Ferdi Napoli
CC BY-NC-SA 3.0

View File

@ -1,3 +0,0 @@
Ferdi Napoli Reserve
Ferdi Napoli
CC BY-NC-SA 3.0

View File

@ -1,3 +0,0 @@
Joker
Ferdi Napoli
CC BY-NC-SA 3.0

View File

@ -1,3 +0,0 @@
Bleau Steve
Ferdi Napoli
CC BY-NC-SA 3.0

View File

@ -1,3 +0,0 @@
Deadpool Bleau
Ferdi Napoli
CC BY-NC-SA 3.0

View File

@ -1,3 +0,0 @@
Seth Rollins
Ferdi Napoli
CC BY-NC-SA 3.0

View File

@ -1,3 +0,0 @@
Daffy Duck
LuxAtheris
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
DareDevil
Ferdi Napoli
CC BY-NC-SA 3.0

View File

@ -1,3 +0,0 @@
Clone
Ferdi Napoli
CC BY-NC-SA 3.0

View File

@ -1,3 +0,0 @@
Banana Guy
Ferdi Napoli
CC BY-NC-SA 3.0

View File

@ -1,3 +0,0 @@
Rubber
Ferdi Napoli
CC BY-NC-SA 3.0

View File

@ -1,3 +0,0 @@
Gothic Sam
GingerHunter797
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
Tails
Ferdi Napoli
CC BY-NC-SA 3.0

View File

@ -1,3 +0,0 @@
Aguia Explorer
Davizinho
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
John
Evergreen
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
Toad
Ferdi Napoli
CC BY-NC-SA 3.0

View File

@ -1,3 +0,0 @@
oOChainLynxOo
oOChainLynxOo
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
amazing spiderman
mateus
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
black spiderman
mateus
CC BY-NC-SA 3.0

View File

@ -1,3 +0,0 @@
Sam Mese Tee
oOChainLynxOo
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
Jesus
Ferdi Napoli
CC BY-NC-SA 3.0

View File

@ -1,3 +0,0 @@
Wires
Geopbyte
CC BY-SA 3.0

View File

@ -1,3 +0,0 @@
Vector
Ferdi Napoli
CC BY-NC-SA 3.0

Some files were not shown because too many files have changed in this diff Show More