Skip to content

RefreshChatChannels

Sends the channel list to a player’s chat again - for a rule of the mode that changed.

A player’s chat is told its channels when they join and when a channel, their admin flag or their party changes. A channel whose visible or can_send is a function is asked at those moments, so when the answer changes at another one - the player joined a guild, was muted - call this and the chat looks again. Without a player it goes to everyone.

RefreshChatChannels([pid])
Parameter Type
pid number | nil the player; nil for everyone (optional)

nothing

function mute(pid)
muted[pid] = true
RefreshChatChannels(pid) -- the channels whose can_send asks about muted[pid] close for them
end

RegisterChatChannel · the Chat and commands group of the index