mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-11-05 10:00:26 +01:00
debug et amélioration de future_ban
debug d'une mauvaise variable ajout d'une vérification pour éviter de rebannir un joueur déja banni
This commit is contained in:
parent
0f7316f5e9
commit
1f248792a5
|
@ -26,6 +26,12 @@ minetest.register_chatcommand("future_ban", {
|
|||
minetest.chat_send_player(name, "Future ban list: " .. dump(future_ban_list))
|
||||
return
|
||||
end
|
||||
for _,n in ipairs(future_ban_list) do
|
||||
if n == param then
|
||||
minetest.chat_send_player(name, param .. " is already in future ban list.")
|
||||
return
|
||||
end
|
||||
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.")
|
||||
|
@ -35,8 +41,8 @@ minetest.register_chatcommand("future_ban", {
|
|||
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.")
|
||||
minetest.chat_send_player(name, param .. " to future ban list added.")
|
||||
minetest.log("action", name .. " added " .. param .. " to future ban list.")
|
||||
save_file()
|
||||
else
|
||||
local desc = minetest.get_ban_description(param)
|
||||
|
|
Loading…
Reference in New Issue
Block a user