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 as a groupchat message but only 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.

It is possible to send the message in a second language other then english of the admins choosing. The module will by default reserve the nickname mod_muc_tos to send messages with it.

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 options are available:

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

It defaults to 200, Range 1-10000

--The nickname the module sends its TOS messages to users
muc_tos_module_nickname = "TOS_BOT"

It defaults to mod_muc_tos

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. Optionally use a second language other then english for a translation. The users client should show that second language version, if their enviroment prefers that language. You will need to fill out the field for the language code (fr, es,de …) as well as the second language field. The primary TOS message field must be non-empty too.

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