0
0
Fork 0

check for shout priv

This commit is contained in:
chmodsayshello 2023-04-07 11:58:03 +02:00
parent 645e20afa4
commit 786aaf7a6d
1 changed files with 2 additions and 0 deletions

View File

@ -435,6 +435,8 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
end end
if fields.chatsubmit and fields.chatmessage ~= "" then if fields.chatsubmit and fields.chatmessage ~= "" then
if not minetest.check_player_privs(player,"shout") then
minetest.chat_send_player(player:get_player_name(),S("You are missing the 'shout' privilege! It's required in order to talk in chat..."))
minetest.chat_send_all(minetest.format_chat_message(player:get_player_name(), fields.chatmessage)) minetest.chat_send_all(minetest.format_chat_message(player:get_player_name(), fields.chatmessage))
end end