From bce03af12898ca88cfd42098c5f98164d8b64867 Mon Sep 17 00:00:00 2001 From: mckaygerhard Date: Tue, 16 Apr 2024 15:07:35 -0400 Subject: [PATCH] mods - governing - check moderators array before use it --- mods/governing/process.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mods/governing/process.lua b/mods/governing/process.lua index 2336bd4..a81f93f 100644 --- a/mods/governing/process.lua +++ b/mods/governing/process.lua @@ -75,8 +75,10 @@ minetest.register_on_joinplayer(function(player) end msgsys = "[governing] can't retrieve info, player '" .. name .. "' disappeared or seems craker" minetest.after(0.1, function() - for namemd,_ in pairs(cheat.moderators) do - minetest.chat_send_player(namemd,msgsys); + if cheat and cheat.moderators then + for namemd,_ in pairs(cheat.moderators) do + minetest.chat_send_player(namemd,msgsys); + end end end) minetest.log("warning", msgsys)