From ee141232c75d0da3ee0cb17d76532fa8c3203234 Mon Sep 17 00:00:00 2001 From: "Tai @ Flex" Date: Fri, 3 Mar 2017 14:12:16 +0000 Subject: [PATCH] fix channel check --- channel_mode.lua | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/channel_mode.lua b/channel_mode.lua index 18fe992..4ec4633 100644 --- a/channel_mode.lua +++ b/channel_mode.lua @@ -13,7 +13,7 @@ local function channelcheck(playername, params) return false end if params[1] == moderatorchannel then - return minetest.get_player_privs(playername, {basic_privs=true}) + return minetest.check_player_privs(playername, {basic_privs=true}) else return true end @@ -23,11 +23,7 @@ chat_modes.register_mode("channel", { help = "Send messages to a specific channel only.", can_register = function(playername, params) - if not channelcheck(playername, params) then - return false - end - - return true + return channelcheck(playername, params) end, register = function(playername, params)