mod_muc_tos

Introduction

This module adds a Terms of Service message to Prosody rooms. Unlike mod_muc_require_tos this module does not enforce anything. It is an informational message. The message is configured through the room configuration form and is sent privately to unaffiliated users when they join the room. The module keeps a per-room cache of users who have already received the message, so that the message is not sent repeatedly.

Configuration

Add the module to the MUC host:

Component "conference.example.com" "muc"
  modules_enabled = {
    "muc_tos";
  }

The following global or per-MUC Component configuration option is available:

--Maximum number of users kept in the per-room cache
muc_tos_max_users = 200

It defaults to 200, Range 1-10000

Usage

The TOS message itself is configured by the room owner from the room configuration form with ad-hoc enabled clients. Leave the message empty to disable the feature for a room.

Storage

The module uses a keyval+ store named muc_tos_store. Assuming file based storage the information will be stored at your storage location under /path/to/prosody_data/your-muc-component/muc_tos_store/ For a huge muc_tos_max_users value, I would recommend an sql based store, but actual numbers were not tested.

Compatibility

Requires Prosody 13.0 or higher.


Installation

With the plugin installer in Prosody 0.12 you can use:

sudo prosodyctl install --server=https://modules.prosody.im/rocks/ mod_muc_tos

For earlier versions see the documentation for installing 3rd party modules