more ignores and not ignore
This commit is contained in:
parent
04d118469c
commit
d99cfc6d4f
16
common.lua
16
common.lua
@ -1,8 +1,14 @@
|
||||
|
||||
beerchat.has_player_muted_player = function(name, other_name)
|
||||
-- ignore muting for jailed users
|
||||
if beerchat.is_player_jailed(name) then
|
||||
return false
|
||||
end
|
||||
local player = minetest.get_player_by_name(name)
|
||||
-- check jic method is used incorrectly
|
||||
if not player then return true end
|
||||
if not player then
|
||||
return true
|
||||
end
|
||||
|
||||
local key = "beerchat:muted:" .. other_name
|
||||
local meta = player:get_meta()
|
||||
@ -15,7 +21,15 @@ beerchat.is_player_subscribed_to_channel = function(name, channel)
|
||||
end -- is_player_subscribed_to_channel
|
||||
|
||||
beerchat.send_message = function(name, message, channel)
|
||||
local jailed = beerchat.is_player_jailed(name)
|
||||
local is_jail_channel = channel == beerchat.jail_channel_name
|
||||
if jailed and not is_jail_channel then
|
||||
return
|
||||
end
|
||||
minetest.chat_send_player(name, message)
|
||||
if is_jail_channel then
|
||||
return
|
||||
end
|
||||
-- TODO: read player settings for channel sounds
|
||||
if beerchat.enable_sounds and channel ~= beerchat.main_channel_name then
|
||||
minetest.sound_play(beerchat.channel_message_sound, { to_player = name, gain = beerchat.sounds_default_gain } )
|
||||
|
2
init.lua
2
init.lua
@ -41,11 +41,11 @@ beerchat = {
|
||||
}
|
||||
|
||||
local MP = minetest.get_modpath("beerchat")
|
||||
dofile(MP.."/jail.lua")
|
||||
dofile(MP.."/common.lua")
|
||||
dofile(MP.."/format_message.lua")
|
||||
dofile(MP.."/hooks.lua")
|
||||
dofile(MP.."/storage.lua")
|
||||
dofile(MP.."/jail.lua")
|
||||
dofile(MP.."/session.lua")
|
||||
dofile(MP.."/pm.lua")
|
||||
dofile(MP.."/hash.lua")
|
||||
|
Loading…
x
Reference in New Issue
Block a user