From 5f09a3d249f8761421345b6da78ca1eacc4e2876 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Wed, 24 May 2017 00:24:50 +0200 Subject: [PATCH] Remove commands in mesecons_commandblock --- .../REDSTONE/mesecons_commandblock/init.lua | 43 ------------------- 1 file changed, 43 deletions(-) diff --git a/mods/ITEMS/REDSTONE/mesecons_commandblock/init.lua b/mods/ITEMS/REDSTONE/mesecons_commandblock/init.lua index e1842bfe..80cc40a0 100644 --- a/mods/ITEMS/REDSTONE/mesecons_commandblock/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_commandblock/init.lua @@ -1,46 +1,3 @@ -minetest.register_chatcommand("say", { - params = "", - description = "Say as the server", - privs = {server=true}, - func = function(name, param) - minetest.chat_send_all(name .. ": " .. param) - end -}) - -minetest.register_chatcommand("tell", { - params = " ", - description = "Say to privately", - func = function(name, param) - local found, _, target, message = param:find("^([^%s]+)%s+(.*)$") - if found == nil then - minetest.chat_send_player(name, "Invalid usage: " .. param) - return - end - if not minetest.get_player_by_name(target) then - minetest.chat_send_player(name, "Invalid target: " .. target) - end - minetest.chat_send_player(target, name .. " whispers: " .. message, false) - end -}) - -minetest.register_chatcommand("hp", { - params = " ", - description = "Set health of to hitpoints", - privs = {ban=true}, - func = function(name, param) - local found, _, target, value = param:find("^([^%s]+)%s+(%d+)$") - if found == nil then - minetest.chat_send_player(name, "Invalid usage: " .. param) - return - end - local player = minetest.get_player_by_name(target) - if player then - player:set_hp(value) - else - minetest.chat_send_player(name, "Invalid target: " .. target) - end - end -}) local function initialize_data(meta) local commands = minetest.formspec_escape(meta:get_string("commands"))