Priv-check before unmuting
This commit is contained in:
parent
99100857af
commit
a820ae6503
6
init.lua
6
init.lua
@ -83,10 +83,14 @@ function filter.mute(name, duration)
|
||||
muted[name] = true
|
||||
|
||||
minetest.after(duration * 60, function()
|
||||
privs = minetest.get_player_privs(name)
|
||||
if privs.shout == true then
|
||||
return
|
||||
end
|
||||
|
||||
muted[name] = nil
|
||||
minetest.chat_send_player(name, "Chat privilege reinstated. Please do not abuse chat.")
|
||||
|
||||
local privs = minetest.get_player_privs(name)
|
||||
privs.shout = true
|
||||
minetest.set_player_privs(name, privs)
|
||||
end)
|
||||
|
Loading…
Reference in New Issue
Block a user