fix channel check

This commit is contained in:
Tai @ Flex 2017-03-03 14:12:16 +00:00
parent 6abeb1e64e
commit ee141232c7

View File

@ -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)