log chat only for those with privilege
This commit is contained in:
parent
57048f621a
commit
20f330cdb5
4
api.lua
4
api.lua
@ -188,13 +188,13 @@ minetest.register_chatcommand("chatmodes", {
|
||||
dodebug("Chat interception")
|
||||
|
||||
minetest.register_on_chat_message(function(playername, message)
|
||||
minetest.log("action", "MODAL CHAT: "..message)
|
||||
|
||||
if not minetest.get_player_privs(playername, {shout = true}) then
|
||||
minetest.chat_send_player(playername, "Chat message send failed. You do not have the 'shout' privilege.")
|
||||
return true
|
||||
end
|
||||
|
||||
minetest.log("action", "MODAL CHAT: "..message)
|
||||
|
||||
local targetmode = playermodes[playername]
|
||||
local modedef = heuristics[ targetmode ]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user