From d88921b5f21108db80546c02b65c2f5378a57728 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 12 Jan 2017 16:22:09 +0100 Subject: [PATCH] Remove killme and clearme --- mods/commands/init.lua | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/mods/commands/init.lua b/mods/commands/init.lua index 466b566bbe..5e1bb4776e 100644 --- a/mods/commands/init.lua +++ b/mods/commands/init.lua @@ -72,26 +72,17 @@ minetest.register_chatcommand("clear", { end, }) -minetest.register_chatcommand("clearme", { - description = S("Clear your inventory"), - func = function(name) - return handle_clear_command(name, name) - end, -}) - minetest.register_chatcommand("kill", { - params = S(""), + params = S("[]"), description = S("Kill player"), privs = {kill=true}, func = function(name, param) - return handle_kill_command(name, param) - end, -}) - -minetest.register_chatcommand("killme", { - description = S("Kill yourself"), - func = function(name) - return handle_kill_command(name, name) + if(param == "") then + -- Selfkill + return handle_kill_command(name, name) + else + return handle_kill_command(name, param) + end end, })