From 96636d4c88c709a1bb72cf3cbfef96fbf59e7ac9 Mon Sep 17 00:00:00 2001 From: Thomas--S Date: Fri, 10 May 2019 14:09:01 +0200 Subject: [PATCH] Fix crash on grant/revoke of vote_starter, when granter/revoker is nil --- mods/other/vote/vote_kick.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mods/other/vote/vote_kick.lua b/mods/other/vote/vote_kick.lua index 170e318..cf29a9e 100644 --- a/mods/other/vote/vote_kick.lua +++ b/mods/other/vote/vote_kick.lua @@ -4,10 +4,16 @@ local vlist = {} -- table storing player name, ip & lock status minetest.register_privilege("vote_kick", { description = "Can (start) vote to kick a player", on_grant = function(name, granter) + if not granter then + granter = "" + end minetest.log("warning", "Player '" .. name .. "' has been" .. " granted 'vote_kick' by '" .. granter .. "'") end, on_revoke = function(name, revoker) + if not revoker then + revoker = "" + end minetest.log("warning", "Player '" .. name .. "' has been" .. " revoked of 'vote_kick' by '" .. revoker .. "'") end