Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions doc/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
* Send permanent XLINEs and RESVs to remote server -- m_sendbans
* Shed users from the server -- m_shedding
* WebIRC support -- m_webirc
* draft/multiline batch support -- multiline
* Prevent opers from killing services -- no_kill_services
* Opers cannot be invisible (umode +i) -- no_oper_invis
* Oper override -- override
Expand Down Expand Up @@ -157,6 +158,7 @@
#loadmodule "extensions/m_sendbans";
#loadmodule "extensions/m_shedding";
#loadmodule "extensions/m_webirc";
#loadmodule "extensions/multiline";
#loadmodule "extensions/no_kill_services";
#loadmodule "extensions/no_oper_invis";
#loadmodule "extensions/override";
Expand Down Expand Up @@ -1527,6 +1529,16 @@ general {
*/
drain_reason = "This server is not accepting connections.";

/* multiline_max_lines: Maximum number of lines accepted in a multiline batch.
* requires extensions/multiline to be loaded.
*/
#multiline_max_lines = 10;

/* multiline_max_bytes: Maximum number of bytes accepted in a multiline batch.
* requires extensions/multiline to be loaded.
*/
#multiline_max_bytes = 2000;

/* filter_sees_user_info: Whether the filter is given the nick!user@host of message senders.
* If set to NO, the filter is given a literal "*!*@*" instead.
* Requires extensions/filter to be loaded.
Expand Down
78 changes: 77 additions & 1 deletion doc/technical/ts6.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ Solanum supports the following server capabilities (enabled via `CAPAB`):
| CLUSTER | core | legacy | Remote (UN)RESV/(UN)XLINE (not using ENCAP) |
| EBMASK | core | recommended | EBMASK command (burst +beIq with ts/setter data) |
| ECHO | m_message | recommended | ECHO command (for echo-message) |
| ECHOB | m_message | recommended | solanum.chat/echo BATCH type (for echo-message) |
| ENCAP | core | required | ENCAP command |
| EOPMOD | core | recommended | STATUSMSG = prefix (+z applied to +bq), ETB command |
| EUID | core | recommended | EUID command (UID + realhost/login info) |
Expand All @@ -318,6 +319,7 @@ Solanum supports the following server capabilities (enabled via `CAPAB`):
| KLN | core | legacy | Remote KLINE (not using ENCAP) |
| KNOCK | core | optional | KNOCK command (request invite to channel) |
| MLOCK | core | recommended | MLOCK command (force channel modes set/unset) |
| MULTILN | multiline | draft | draft/multiline BATCH type |
| QS | core | required | Quit storms (no need to send recursive SQUIT) |
| REMOVE | m_remove | optional | REMOVE command (force part) |
| RSFNC | core | advertisement | ENCAP RSFNC (force nick change) |
Expand Down Expand Up @@ -2777,6 +2779,7 @@ tag. Unrecognized tags are stripped and not propagated further.
| batch | m_batch | required |
| msgid | tag_message_id | recommended |
| time | cap_server_time | recommended |
| draft/multiline-concat | multiline | draft |
| solanum.chat/response | cap_labeled_response | required |
| +channel-context | tag_channel_context | optional |
| +reply | tag_reply | optional |
Expand All @@ -2787,6 +2790,11 @@ tag. Unrecognized tags are stripped and not propagated further.
Messages with a batch tag that do not correspond to an open `BATCH` between
the linked servers will be silently dropped.

### draft/multiline-concat

This tag may only be attached to a message inside of a draft/multiline batch
and will be stripped in all other contexts.

### msgid

This tag may be attached to `PRIVMSG`, `NOTICE`, and `TAGMSG` commands and
Expand Down Expand Up @@ -2854,4 +2862,72 @@ nest batches, and can interleave batched and non-batched messages. Open S2S
batches do not time out automatically and will remain open until the remote
server finishes it or disconnects.

Solanum does not currently support any S2S batch types.
Solanum currently supports the following S2S batch types:

### draft/multiline

- Capability: **MULTILN**
- Source: any
- Propagation: broadcast
- Implementation: draft
- Nesting: No nesting allowed
- Syntax: `BATCH +<id> draft/multiline [<prefix>]<channel>`

Sends a multiline message to the channel. A prefix of "@" or "+" additionally
requires **CHW** while a prefix of "=" additionally requires both **CHW** and
**EOPMOD**. Propagation of this batch in the =#channel case matches that of
`NOTICE` with respect to special fallback cases. Inner messages must adhere
to the requirements of the multiline message ircv3 specification, but no
validation is performed for multiline batches received from remote servers.

----

- Capability: **MULTILN**
- Source: any
- Propagation: target
- Implementation: draft
- Nesting: No nesting allowed
- Syntax: `BATCH +<id> draft/multiline <target>`

Sends a multiline message to the user. Inner messages must adhere to the
requirements of the multiline message ircv3 specification, but no validation
is performed for multiline batches received from remote servers.

Note: Special targets (user@server, $$/$# mass-messages) are not supported for
multiline batches.

Example:
```
:001AAAAAA BATCH +foo draft/multiline 002BBBBBB
@batch=foo :001AAAAAA PRIVMSG 002BBBBBB :hello
@batch=foo,draft/multiline-concat :001AAAAAA PRIVMSG 002BBBBBB : world
:001AAAAAA BATCH -foo
```

### solanum.chat/echo

- Capability: **ECHOB**
- Source: user
- Propagation: target
- Implementation: recommended
- Nesting: Allows arbitrary nested batches
- Syntax: `BATCH +<id> solanum.chat/echo <target>`

This batch type is used when a server needs to generate an echo-message for a
`BATCH`. All inner messages of the solanum.chat/echo batch will be relayed to
the target as-is (unlike other S2S messages, SIDs/UIDs within parameters of
inner messages *are not replaced* with the name of the server or client). The
prefix may be omitted on inner messages, as the target server will generate
the appropriate prefix as if the target sent the message. If inner messages
contain a prefix, the prefix cannot specify a fake direction and will be
otherwise ignored.

Example:
```
:001AAAAAA BATCH +foo solanum.chat/echo 002BBBBBB
@batch=foo BATCH +bar draft/multiline #channel
@batch=bar PRIVMSG #channel :hello
@batch=bar PRIVMSG #channel :world
@batch=foo BATCH -bar
:001AAAAAA BATCH -foo
```
1 change: 1 addition & 0 deletions extensions/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ extension_LTLIBRARIES = \
m_sendbans.la \
m_shedding.la \
m_webirc.la \
multiline.la \
no_kill_services.la \
no_oper_invis.la \
override.la \
Expand Down
1 change: 1 addition & 0 deletions extensions/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ extension_modules = [
'm_sendbans',
'm_shedding',
'm_webirc',
'multiline',
'no_kill_services',
'no_oper_invis',
'override',
Expand Down
Loading