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 return false
end end
if params[1] == moderatorchannel then if params[1] == moderatorchannel then
return minetest.get_player_privs(playername, {basic_privs=true}) return minetest.check_player_privs(playername, {basic_privs=true})
else else
return true return true
end end
@ -23,11 +23,7 @@ chat_modes.register_mode("channel", {
help = "Send messages to a specific channel only.", help = "Send messages to a specific channel only.",
can_register = function(playername, params) can_register = function(playername, params)
if not channelcheck(playername, params) then return channelcheck(playername, params)
return false
end
return true
end, end,
register = function(playername, params) register = function(playername, params)