From 93caba075c2fb7562034eac5ad732276438f1777 Mon Sep 17 00:00:00 2001 From: luk3yx Date: Sun, 28 Apr 2019 07:48:11 +1200 Subject: [PATCH] Fix bug with CSM restrictions --- init.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index e13b963..c11c37c 100644 --- a/init.lua +++ b/init.lua @@ -124,10 +124,12 @@ chat_channels.get_channel_users = function(c) if not connected_players[name] then local empty = true local visible_players = minetest.get_player_names() - for _, player in ipairs(visible_players) do - if player == name then - empty = false - break + if visible_players then + for _, player in ipairs(visible_players) do + if player == name then + empty = false + break + end end end if empty then return {} end