ctf_chat: Add missing priv check in default chat message handler

master
ANAND 2019-04-30 20:02:03 +05:30
parent 48545e39e8
commit 719ab291ce
No known key found for this signature in database
GPG Key ID: 3AD8A3C4A51AAB97
1 changed files with 4 additions and 0 deletions

View File

@ -441,6 +441,10 @@ else
end
end
if not minetest.check_player_privs(name, {shout = true}) then
minetest.chat_send_player("-!- You don't have permission to shout.")
return true
end
local tcolor = ctf_colors.get_color(ctf.player(name))
minetest.chat_send_all(minetest.colorize(tcolor.css, "<" .. name .. "> ") .. message)
return true