From d3a282b42fa0c1bcf48dbbe3815ef6d04bd032f8 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Fri, 17 Mar 2017 23:52:38 +0000 Subject: [PATCH] Remove kick voting --- init.lua | 42 ------------------------------------------ 1 file changed, 42 deletions(-) diff --git a/init.lua b/init.lua index 9659273..e3a1be4 100644 --- a/init.lua +++ b/init.lua @@ -289,45 +289,3 @@ minetest.register_chatcommand("abstain", { vote.check_vote(voteset) end }) - -local set = minetest.setting_get("vote.kick_vote") -if set == nil or minetest.is_yes(set) then - minetest.register_chatcommand("vote_kick", { - privs = { - interact = true - }, - func = function(name, param) - if not minetest.get_player_by_name(param) then - minetest.chat_send_player(name, "There is no player called '" .. - param .. "'") - return - end - - vote.new_vote(name, { - description = "Kick " .. param, - help = "/yes, /no or /abstain", - name = param, - duration = 60, - perc_needed = 0.8, - - on_result = function(self, result, results) - if result == "yes" then - minetest.chat_send_all("Vote passed, " .. - #results.yes .. " to " .. #results.no .. ", " .. - self.name .. " will be kicked.") - minetest.kick_player(self.name, "The vote to kick you passed") - else - minetest.chat_send_all("Vote failed, " .. - #results.yes .. " to " .. #results.no .. ", " .. - self.name .. " remains ingame.") - end - end, - - on_vote = function(self, name, value) - minetest.chat_send_all(name .. " voted " .. value .. " to '" .. - self.description .. "'") - end - }) - end - }) -end