The "opermotd" Module (v4)
Description
This module adds the /OPERMOTD
command which adds a special message of the day for server operators.
Configuration
To load this module use the following <module>
tag:
<module name="opermotd">
<files>
& <execfiles>
This module extends the core <files>
and <execfiles>
tags with the following fields:
Name | Type | Default Value | Description |
---|---|---|---|
opermotd | Text | None | The file to read or command to execute to obtain the opermotd text. |
Example Usage
Obtains the server operator message of the day by reading opermotd.txt:
<files ...
opermotd="opermotd.txt">
Obtains the server operator message of the day by executing curl https://www.example.com/opermotd.txt
:
<execfiles ...
opermotd="curl https://www.example.com/opermotd.txt">
<oper>
& <type>
This module extends the core <oper>
and <type>
tags with the following fields:
Name | Type | Default Value | Description |
---|---|---|---|
motd | Text | opermotd | The file path or name of the field in <files> / <execfiles> to use when reading the server operator message of the day. |
automotd | Boolean | Yes | Whether to send the server operator message of the day to server operators when they log into their server operator account. |
The file specified in the motd field can contain the following formatting codes:
Escape | Example (raw) | Example (formatted) | Description |
---|---|---|---|
\b | foo \bbar\b baz | foo bar baz | Toggles whether text should be bold. |
\c<fg>[,<bg>] | foo \c03bar\c baz foo \c11,04bar\c baz | foo foo | Toggles the foreground and/or background color of text. |
\c{<fg>[,<bg>]} | foo \c{green}bar\c baz foo \c{cyan,red}bar\c baz | foo foo | New in v4.3.0! Toggles the foreground and/or background color of text using color names (see below). |
\h<fg>[,<bg>] | foo \hea74dcbar\h baz foo \h613583,2ec27ebar\h baz | foo foo | Toggles the foreground and/or background color of text using hex colors (not widely supported). |
\i | foo \ibar\i baz | foo bar baz | Toggles whether text should be italicised. |
\m | foo \mbar\m baz | foo bar baz | Toggles whether text should be monospace (not widely supported). |
\r | foo \c{blue,orange}bar\r baz | foo | Swaps the foreground and background color. |
\s | foo \sbar\s baz | foo | Toggles whether text should be struckthrough (not widely supported). |
\u | foo \ubar\u baz | foo bar baz | Toggles whether text should be underlined. |
\x | foo \b\ibar\x baz | foo bar baz | Terminates any previously specified formatting. |
If using named colors they are converted to raw color codes as follows:
Code | Name | Example |
---|---|---|
00 | white | |
01 | black | |
02 | blue | |
03 | green | |
04 | red | |
05 | brown | |
06 | magenta | |
07 | orange | |
08 | yellow | |
09 | light green | |
10 | cyan | |
11 | light cyan | |
12 | light blue | |
13 | pink | |
14 | grey | |
15 | light grey | |
99 | default | Depends on client theme |
Colors in the range 16-98 are not widely supported and do not have names. See ircdocs for more information.
Example Usage
Shows an oper MOTD to Sadie when they log into their server operator account:
<oper name="Sadie"
...
motd="opermotd"
automotd="yes">
Shows an oper MOTD to server operators of type NetAdmin when they log into their server operator account:
<type name="NetAdmin"
...
motd="opermotd"
automotd="yes">
Commands
Name | Parameter Count | Syntax | Description |
---|---|---|---|
OPERMOTD | 0-1 | [<server>] | Requests the server operator message of the day for <server>. |
Example Usage
Requests the server operator message of the day for the local server:
/OPERMOTD
Requests the server operator message of the day for irc.example.com:
/OPERMOTD irc.example.com