From 5b6484eddc224e2ffa5c50d5bf1dae558450dd92 Mon Sep 17 00:00:00 2001 From: ezhh Date: Mon, 25 Jul 2016 00:45:43 +0100 Subject: [PATCH] Added /list_caged command --- init.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/init.lua b/init.lua index 3892858..7820b36 100644 --- a/init.lua +++ b/init.lua @@ -260,6 +260,20 @@ minetest.register_chatcommand("uncage", { end }) +-- list caged players +minetest.register_chatcommand("list_caged", { + params = "", + description = "List all caged players.", + privs = {server = true}, + func = function (_, _) + local players = "" + for player, _ in pairs(priv_table) do + players = players .. player .. ", " + end + return true, "Currently caged players: " .. players + end +}) + --Other Commands