Allow chat admin to delete channels (#69)
parent
19aafbe238
commit
98aa631170
|
@ -93,7 +93,7 @@ local delete_channel = {
|
|||
return false, "ERROR: Channel " .. param .. " does not exist"
|
||||
end
|
||||
|
||||
if name ~= beerchat.channels[param].owner then
|
||||
if name ~= beerchat.channels[param].owner and not minetest.check_player_privs(name, beerchat.admin_priv) then
|
||||
return false, "ERROR: You are not the owner of channel " .. param
|
||||
end
|
||||
|
||||
|
|
3
init.lua
3
init.lua
|
@ -9,6 +9,9 @@ beerchat = {
|
|||
-- The main channel is the one you send messages to when no channel is specified
|
||||
main_channel_name = minetest.settings:get("beerchat.main_channel_name") or "main",
|
||||
|
||||
-- Chat administrator privilege allows bypassing owner checks
|
||||
admin_priv = minetest.settings:get("beerchat.admin_priv") or "server",
|
||||
|
||||
-- The default color of channels when no color is specified
|
||||
default_channel_color = "#ffffff",
|
||||
|
||||
|
|
Loading…
Reference in New Issue