Simple: people want to either paste multi-line things (e.g. code) or say things that either cover multiple lines or extend past the ~512 byte cap. this spec is designed to solve all 3.
bitbot.dev/multiline
Indicates the client can handle (and send) multiline BATCH
es. REQ
ing this CAP
implicitly enabled BATCH
es but only of the type bitbot.dev/multiline
bitbot.dev/mulitline
This spec (somewhat unfortunately) has to introduce the concept of client-to-server BATCH
es. The same rules and regulations for server-to-client BATCH
es applies.
bitbot.dev/multiline-concat
This is used to concatenate a line to the previous line instead of making it a new line entirely. Used to bypass ~512 byte cap. Can only be used within the bitbot.dev/multiline
BATCH
.
Degradation to non-compat clients is simple. Strip the BATCH
and strip the c2c message tag. Leave it up to the client sending the multiline message to break long lines gracefully (on word boundaries etc) so that it still looks reasonable when a bitbot.dev/multiline-concat
line hits a non-compat client - much like e.g. irssi does now; if you send a really long line, irssi will split it in to multiple lines and try to split the lines up at places that make sense to whoever is receiving it instead of cutting a word in half.
This will probably require servers to relax some flood-protection rules in the event of this BATCH
being received - counting them all as one message or so. Servers might also want to reject large BATCH
es in channels but permit them in private.
c -> s: BATCH +123 bitbot.dev/multiline #channel
c -> s: @batch=123 PRIVMSG #channel hello
c -> s: @batch=123 privmsg #channel :how is
c -> s: @batch=123;bitbot.dev/multiline-concat PRIVMSG #channel : everyone?
c -> s: BATCH -123
s -> c: :jesopo!jess@lolnerd.net BATCH +123 bitbot.dev/multiline #channel
s -> c: @batch=123 :jesopo!jess@lolnerd.net PRIVMSG #channel hello
s -> c: @batch=123 :jesopo!jess@lolnerd.net PRIVMSG #channel :how is
s -> c: @batch=123;bitbot.dev/multiline-concat :jesopo!jess@lolnerd.net PRIVMSG #channel : everyone?
s -> c: BATCH -123
Becomes
hello
how is everyone?
Will hit non-compat clients as:
:n!u@h PRIVMSG #channel hello
:n!u@h PRIVMSG #channel :how is
:n!u@h PRIVMSG #channel : everyone?