mod_welcome
Greet users with a message of the day. Part of the bundled plug-ins.
mod_welcome sends a message of the day (MOTD) to each user when they log in, and
optionally publishes hub rules. Each configured file also gets a command so users can re-read
it on demand.
Loading
plugin /var/lib/uhub/mod_welcome.so "motd=/etc/uhub/motd.txt rules=/etc/uhub/rules.txt rtf0=true"
Configuration
| Option | Default | Description |
|---|---|---|
motd | — | File whose contents are sent to each user on login. Enables the !motd command. |
rules | — | File with the hub rules. Enables the !rules command (not sent automatically). |
rtf0 | false | Send the MOTD and rules as rich text, so clients supporting the RTF0 extension render them. 0.8.0 |
Commands
| Command | Access | Description |
|---|---|---|
!motd | guest | Show the message of the day (when motd is configured). |
!rules | guest | Show the hub rules (when rules is configured). |
Substitutions
The following placeholders are expanded in the MOTD and rules text:
| Token | Expands to |
|---|---|
%n | the user's nick |
%a | the user's IP address |
%c | the user's credentials (guest, user, operator, …) |
%t | the TLS version protecting the user's connection 0.8.0 |
%% | a literal percent sign |
%H %I %M %S %p %P | current time fields (hour 24h / hour 12h / minute / second / am-pm) |
Rich text
With rtf0=true, the MOTD and rules are sent as rich text and clients that
negotiated the RTF0 extension render them as CommonMark — headings, emphasis, links, and
images embedded by URL with :
## Welcome to **My Hub**, %n!
You are connected over %t as *%c*.
See the [rules](https://example.org/rules) before sharing.

Clients without RTF0 support receive the plain text either way, so the file should still read
sensibly unrendered. Nothing is sent as rich text when the hub is configured with
chat_rich_text set to no, regardless of this option.
Embedded images are fetched by the client from the URL you write, which exposes each connecting user's IP address to that host. Only reference images you control.