Muting Objects and Agents

The viewer is responsible for implementing the muting of agents and objects. When the viewer initiates a new session, it requests the Mute List from the Second Life service. Once this list has been received and processed, each chat message that the viewer receives is compared against a list of muted items. If a chat message originates from a muted item, it is suppressed.

Mute List Classes

There are two primary classes that are used to implement and manage the viewer's mute list:

Both of these classes are declared in llmutelist.h and implemented in llmutelist.cpp.

There are two classes that are used to manage the UI related to the mute list:

Managing the Mute List

The viewer's mute list is internally represented by the global LLMuteList* gMuteListp. For more information about the format of the mute list file, see Mute List.

Requesting the Mute List from the service

  1. The viewer requests the agent's mute list by calling LLMuteList::requestFromServer() in llmutelist.cpp
  2. The viewer sends a MuteListRequest message to the service
  3. The service replies with either:
    • A MuteListUpdate message, indicating that the viewer should request a new mute list file from the service, or
    • A UseCachedMuteList message, indicating that the viewer should use its cached copy of the mute list file

Loading a new Mute List

  1. The viewer recevies a MuteListUpdate message from the serice
  2. The mute list file specified in the message is requested by the viewer
  3. Upon receipt of the mute list file, the callback LLMuteList::onFileMuteList() is invoked
  4. The viewer opens the received file, and invokes LLMuteList::loadFromFile() to parse it

Loading a cached Mute List

  1. The viewer receives a UseCachedMuteList message from the service
  2. The viewer opens the cached file, and invokes LLMuteList::loadFromFile() to parse it

Populating the Global Mute List

  1. The mute list file, whether new or cached, is opened by LLMuteList::loadFromFile()
  2. Each mute entry in the pipe-delimited list is parsed
  3. A new LLMute instance is created for each entry, and this instance is added to gMuteListp.

Updating the Mute List

Mute List UI

Mute List Messages

Message From To Description Handler / Sender
MuteListRequest viewer service Requests a mute list for the current agent sent by LLMuteList::requestFromServer()
UpdateMuteListEntry viewer service Adds a new mute entry to the mute list sent by LLMuteList::updateAdd()
RemoveMuteListEntry viewer service Removes a mute entry from the mute list sent by LLMuteList::updateRemove()
MuteListUpdate service viewer Tells the viewer the filename of the mute list to request
  • hooked up by the LLMuteList constructor
  • handled handled by LLMuteList::processMuteListUpdate()
UseCachedMuteList service viewer Tells the viewer to use its cached copy of the mute list
  • hooked up by the LLMuteList' constructor
  • handled by LLMuteList::processUseCachedMuteList()

Effects of Muting

Muting objects and agents currently (as of 1.16.0.5, at least) has the following effects:

Agents

Objects

Inventory

Sounds

Chat