2017-02-27 22:51:55 +00:00
# Minetest : Chat Modes (`chat_modes`)
2017-02-28 21:33:23 +00:00
***----- incomplete -----***
2017-02-28 20:44:57 +00:00
2017-02-27 22:51:55 +00:00
A Minetest mod to enable multiple chat modes.
2017-02-28 21:10:48 +00:00
By default, `chat_modes` is not active. Set `chat_modes.active = true` to activate it. This allows Chat Modes to be incuded in a subgame and not affect singleplayer mode, or be obtrusive to servers that do not want to include its functionality by default.
2017-02-28 20:40:59 +00:00
2017-02-27 22:51:55 +00:00
Players hoping to use the `chat_modes` commands need to have both the `shout` and `cmodeswitch` privileges.
2017-02-28 21:10:48 +00:00
Players without shout will not be able to send messages at all, as per the default chat behaviour, nor will they be able to mute the chat.
2017-02-27 22:51:55 +00:00
Players with `shout` , but without `cmodeswitch` , will only be able to use the default mode, as configured in `minetest.conf`
## Default Modules
2017-02-28 21:10:48 +00:00
A few modules are provided by default, annd active by default if `chat_modes.active` is set to true:
2017-02-27 22:51:55 +00:00
2017-02-28 21:10:48 +00:00
* `shout` -- this allows the player to broadacast a message to all connected players, just like in normal chat.
2017-02-27 22:51:55 +00:00
* `proximity` -- this module sends a message to players within the proximity of the sending player
* `channel` -- this module sends messages only to players who are in the shout channel. A player can only be in one channel at a time.
2017-03-01 10:14:43 +00:00
* There is a `moderators` channel which only players with `basic_privs` can access, to allow moderators to chat.
2017-02-27 22:51:55 +00:00
It is possible to disable these modules by specifying a comma-separated list to `chat_modes.available` .
By default, this is set to
chat_modes.available = shout,proximity,channel
2017-02-28 21:10:48 +00:00
By setting `chat_modes.available = ` (that is, a blank string) the default modules are turned off. Only mods that register any extra modes will be active.
2017-02-27 22:51:55 +00:00
## Usage
2017-02-28 20:03:50 +00:00
Any player with the `shout` privilege can deafen themselves
* `/deaf`
2017-02-28 21:10:48 +00:00
* This commands toggles the player's `deaf` mode.
* If deaf mode is on, they do not receive chat messages, regardless of their chat mode.
2017-02-28 20:03:50 +00:00
Players with both the `shout` and `cmodeswitch` privileges has access to the following commands:
2017-02-27 22:51:55 +00:00
* `/chatmode MODE [ARGUMENTS ...]`
* this sets a new chat mode. Some chat modes can take extra arguments, others not.
* `/chatmodes`
* this lists the chat modes available, with a description
2017-02-28 20:03:50 +00:00
Players with the `basic_privs` privilege have access to moderator messaging
2017-02-27 22:51:55 +00:00
2017-03-03 14:11:58 +00:00
* `/chatmodeset PLAYERNAME MODE [ARGUMENTS]`
2017-02-27 22:51:55 +00:00
* Assigns a chat mode to a given player
2017-02-28 20:03:50 +00:00
* `/wall GLOBALMESSAGE`
* Send message to all connected players, regardless of their `deaf` status
2017-02-27 22:51:55 +00:00
## API
2017-02-28 20:40:59 +00:00
See the [API documentation ](API.md ) for details on how to leverage the `chat_modes` API.
2017-02-28 21:10:48 +00:00
Any mod can register a handler with Chat Modes, as long as it specifies `chat_modes` in its `depends.txt` file.