mirror of
https://github.com/minetest-mods/filter.git
synced 2025-03-15 04:11:26 +00:00
Priv-check before unmuting
This commit is contained in:
parent
99100857af
commit
a820ae6503
1 changed files with 5 additions and 1 deletions
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…
Add table
Reference in a new issue