fix channel check
This commit is contained in:
parent
6abeb1e64e
commit
ee141232c7
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user